Allah Almighty saw the sincere repentance of Jonah and heard his invocation in the whale's stomach. Allah commanded the whale to surface and eject Jonah 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 Jonah 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 rays 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 Jonah to recover and forgave him. Allah told Jonah 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.
Summary of Jonah's Story
Almighty Allah recounted: And, verily, Jonah was one of the Messengers. When he ran to the laden ship, he (agreed to) cast lots, and he was among the losers, - Then a (big) fish swallowed him and he had done an act worthy of blame. Had he not been of them who glorify Allah, he would have indeed remained inside its belly (the fish) till the Day of Resurrection. But We cast him forth on the naked shore while he was sick, and We caused a plant of gourd to grow over him. And We sent him to a hundred thousand (people) or even more. And they believed; so We gave them enjoyment for a while. Surah 37: 139-148
Jonah's People - Changed
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.