In the Biblical account is in the entire book of Jonah. God sends Jonah to preach to Nineveh but resents God’s mercy to the repentant city.
Jonah 1:1–3
Now the word of the Lord came to Jonah the son of Amittai, saying, “Arise, go to Nineveh, that great city, and call out against it, for their evil has come up before me.” But Jonah rose to flee to Tarshish from the presence of the Lord. He went down to Joppa and found a ship going to Tarshish. So he paid the fare and went down into it, to go with them to Tarshish, away from the presence of the Lord.Jonah 2:1–2
Then Jonah prayed to the Lord his God from the belly of the fish, saying,
“I called out to the Lord, out of my distress,
and he answered me;
out of the belly of Sheol I cried,
and you heard my voice.Jonah 3:4–5
Jonah began to go into the city, going a day’s journey. And he called out, “Yet forty days, and Nineveh shall be overthrown!” And the people of Nineveh believed God. They called for a fast and put on sackcloth, from the greatest of them to the least of them.Jonah 4:1–2
But it displeased Jonah exceedingly, and he was angry. And he prayed to the Lord and said, “O Lord, is not this what I said when I was yet in my country? That is why I made haste to flee to Tarshish; for I knew that you are a gracious God and merciful, slow to anger and abounding in steadfast love, and relenting from disaster.Matthew 12:38–41
Then some of the scribes and Pharisees answered him, saying, “Teacher, we wish to see a sign from you.” But he answered them, “An evil and adulterous generation seeks for a sign, but no sign will be given to it except the sign of the prophet Jonah. For just as Jonah was three days and three nights in the belly of the great fish, so will the Son of Man be three days and three nights in the heart of the earth. The men of Nineveh will rise up at the judgement with this generation and condemn it, for they repented at the preaching of Jonah, and behold, something greater than Jonah is here.
The Quran states that Jonah (Yūnus) flees, is swallowed by a fish, repents, and is saved. It compresses and moralises the story, turning it into a simple lesson on patience and mercy.
Surah 10:98
“If only there had been a society which believed before seeing the torment — and thus benefited from its belief, like the people of Jonah. When they believed, We removed from them the torment of disgrace in this world and let them enjoy life for a while.”Surah 37:139–148
And Jonah was indeed one of the messengers.
˹Remember˺ when he fled to the overloaded ship.
He drew lots and was among the losers.
Then the fish swallowed him, while he was blameworthy.
And had he not been of those who exalt Allah,
He would have remained inside its belly until the Day they are resurrected.
But We cast him onto the open shore while he was ill.
And We caused to grow over him a gourd vine.
Then We sent him to [his people of] a hundred thousand or more.
And they believed, so We gave them enjoyment [of life] for a time.Surah 68:48–50
“So be patient with your Lord’s decree, and do not be like the man of the fish (i.e., Jonah) who cried out while he was overwhelmed.”
“Had it not been for a favour from his Lord, he would certainly have been cast upon the barren shore while he was blameworthy.”
“But his Lord chose him and made him of the righteous.”