The residents of the town of Nineveh were pagans who lived a brazen life. Prophet Yunus (pbuh) was sent to warn them to follow the decree of Allah Almighty . The people not accepted his intrusion in their way of routine life, so they argued. "We and our ancestors have worshipped these gods for many years and no harm has come to us."
Prophet Yunus (Jonah) (pbuh) also known as Dhan-Nun. About his people Almighty Allah Almighty said: Was there any town community that believed after seeing the punishment, and its Faith at that moment, saved it from the punishment? (the answer is none)--except the people of Yunus; when they believed, We removed from them the torment of disgrace in the life of the present world, and permitted them to enjoy for a while. (10:98 Quran)
Try as messenger put his best to convince them but they overlooked him. Instead of pay heed to laws of Allah Almighty (God Almighty ) , they told Yunus (peace be upon him) that they were not worried of his warnings. "Let it happen," they told him. Messenger was saddened. "in that case, I will leave you to your desolation!" so saying, he left Nineveh , fearing that God Almighty decision would soon follow.
Only just had he left the city when the skies began to change color and looked as if they were on fire. The people were filled with fear by this sight. They recalled the annihilation of the people of 'Ad, Thamud and Noah (peace be upon him). Was theirs to be a similar fate? Slowly faith penetrated their hearts. They all gathered on the mountain and started to implore Allah Almighty for His compassion and pardon. The mountains echoed with their cries. It was a significant hour, filled with honest regret. Allah Almighty has accepted their honest regret.
Meanwhile, Yunus - Jonah ( peace be upon him ) 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. At the back the ship, a large fish was splitting the water and opening its mouth.
The storm continued and the chief crewman asked the crew to lighten the ship's heavy load. They threw their luggage overboard, but this was not enough. Their safety lay in dropping the weight further, so they resolute among themselves to lighten their load by removing at least one person. The captain directed: We will make lots with all of the travelers' names. The one whose name is drawn will be thrown into the sea. The lot was drawn and "Yunus" (peace be upon him) appeared. Since they knew him to be the most worthy among them, they did not wish to throw him into the angry sea. Therefore, they decided to draw a second lot. Again prophet's name was drawn. They gave him a final chance and drew a third lot. Unfortunately messenger's name came up again.
Yunus (peace be upon him) realized that Allah Almighty is annoyed with him, for he had abandoned his mission without permission. The subject was over, and it was decided that he should throw himself into the water. Jonah - Yunus (peace be upon him) was swallowed by the fish. Three layers of darkness wrapped him, one above the other; the darkness of the fish stomach, the darkness of the the sea, the obscure 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. The prophet-messenger continued praying to God Almighty .
Allah Almighty accepted the honest sorrow of Yunus (peace be upon him) and heard his invocation. The fish ejected prophet onto a remote island. Jonah-Yunus (peace be upon him) returned to his home, Nineveh . This time, though, the people there listened to Yunus(Alaih Assalaam) when he told them: You should ahere what Allah Almighty ( God ) Almighty command's you and don't act against the laws of Allah Almighty .