The inhabitants of the town of Nineveh were idolaters who lived a shameless life. Prophet Yunus (pbuh) was sent to teach them the worship of Allah. The people disliked his interference in their way of worship, so they argued. "We and our forefathers have worshipped these gods for many years and no harm has come to us."
Try as he might to convince them of the foolishness of idolatry and of the goodness of Allah's laws, the ignored him. He warned them that if they kept on with their foolishness, Allah's punishment would soon follow. Instead of fearing Allah, they told Yunus that they were not afraid of his threats. "Let it happen," they told him. Yunus was disheartened. "in that case, I will leave you to your misery!" so saying, he left Nineveh, fearing that Allah's anger would soon follow.
Hardly had he left the city when the skies began to change colour and looked as if they were on fire. The people were filled with fear by this sight. They recalled the destruction of the people of 'Ad, Thamud and Noah. Was theirs to be a similar fate? Slowly faith penetrated their hearts. They all gathered on the mountain and started to beseech Allah for His mercy and forgiveness. The mountains echoed with their cries. It was a momentous hour, filled with sincere repentance. Allah removed His wrath and showered His blessings upon them once again. When the threatening storm was lifted, they prayed for the return of Yunus so that he could guide them.
Meanwhile, Yunus had boarded a small ship in the company of other passengers. It sailed all day in calm waters with a good wind blowing at the sails. When night came, the sea suddenly changed. A horrible storm blew as if it were going to split the ship into pieces. The waves looked wild. They rose up as high as mountains then plunged down like valleys, tossing the ship and sweeping over the deck. Behind the ship, a large whale was splitting the water and opening its mouth. A command had been issued from Almighty Allah to one of the greatest whales of the sea to surface. It obeyed. The whale hurried to the surface of the sea and followed the ship as it had been commanded. The tempest continued and the chief crewman asked the crew to lighten the ship's heavy load. They threw their baggage overboard, but this was not enough. Their safety lay in reducing the weight further, so they decided among themselves to lighten their load by removing at least one person.
The captain directed: We will make lots with all of the travellers’ names. The one whose name is drawn will be thrown into the sea." Yunus knew this was one of the seamen's traditions when facing a tempest. It was a strange polytheistic tradition, but it was practiced at that time. Yunus's affliction and crisis began. Here was the prophet, subjected to polytheistic rules that considered the sea and the wind to have gods that riot. The captain had to please these gods. Yunus reluctantly participated in the lot, and his name was added to the other travellers’ names. The lot was drawn and "Yunus" appeared. Since they knew him to be the most honourable among them, they did not wish to throw him into the angry sea. Therefore, they decided to draw a second lot. Again, Yunus's name was drawn. They gave him a final chance and drew a third lot. Unfortunately for Yunus, his name came up again. Yunus realised that Allah's hand was in all this, for he had abandoned his mission without Allah's consent. The matter was over, and it was decided that Yunus should throw himself into the water. Yunus stood at the edge of the ship looking at the furious sea. It was night and there was no moon. The stars were hidden behind a black fog. But before he could be thrown overboard, Yunus kept mentioning Allah's name as he jumped into the raging sea and disappeared beneath the huge waves.
The whale found Yunus floating on the waves before it. It swallowed Yunus into its furious stomach and shut its ivory teeth on him as if they were white bolts locking the door of his prison. The whale dived to the bottom of the sea, the sea that runs in the abyss of darkness. Three layers of darkness enveloped him, one above the other; the darkness of the whale's stomach, the darkness of the bottom of the sea, the darkness of the night. Yunus imaged himself to be dead, but his senses became alert when he found he could move. He knew that he was alive and imprisoned in the midst of three layers of darkness. His heart was moved by remembering Allah. His tongue released soon after saying:
" La ilaha illa Anta (none has the right to be worshipped but You (O Allah), Glorified (and Exalted) be You (above all that evil they associate with You), Truly, I have been of the wrong doers." (Ch 21:87 Quran)
Yunus continued praying to Allah, repeating this invocation. Fishes, whales, seaweeds, and all the creatures that lived in the sea heard the voice of Yunus praying, heard the celebration of Allah's praises issuing from the whale's stomach. All these creatures gathered around the whale and began to celebrate the praises of Allah in their turn, each in its own way and in its own language. The whale also participated in celebrating the praises of Allah and understood that it had swallowed a prophet. Therefore it felt afraid; however, it said to itself; "Why should I be afraid? Allah commanded me to swallow him."
Allah Almighty saw the sincere repentance of Yunus and heard his invocation in the whale's stomach. Allah commanded the whale to surface and eject Yunus onto an island. The whale obeyed and swam to the farthest side of the ocean. Allah commanded it to rise towards the warm, refreshing sun and the pleasant earth. The whale ejected Yunus onto a remote island. His body was inflamed because of the acids inside the whale's stomach. He was ill, and when the sun rose, its ray burned his inflamed body so that he was on the verge of screaming for the pain. However, he endured the pain and continued to repeat his invocation to Allah. Almighty Allah caused a vine to grow to considerable length over him for protection. Then Allah Exalted caused Yunus to recover and forgave him. Allah told Yunus that if it had not been for his praying to Him, he would have stayed in the whale's stomach till the Day of Judgment.
Gradually he regained his strength and found his way to his hometown, Nineveh. He was pleasantly surprised to notice the change that had taken place there. The entire population turned out to welcome him. They informed him that they had turned to believe in Allah. Together they led a prayer of thanksgiving to their Merciful Lord.