called upon Allah from deep distress and was rescued through His mercy. His story teaches repentance, patience, and hope in Allah's response.
The story
Departure and a crowded ship
left in anger and boarded a laden ship. Ibn Kathīr explains that his departure was from his people before permission had been given. The passengers drew lots, and his lot was among those selected. A great fish swallowed him. The account directs attention to his need to return to Allah, not to an imagined escape from Allah's power.
In the darkness, called upon Allah, affirming His perfection and acknowledging his own wrongdoing. Allah answered and rescued him from distress. The passage in Sūrah also connects his deliverance with his glorification of Allah. His rescue was mercy from his Lord, not a result of physical strength or an ability to free himself from the fish.
was cast onto an open shore in a weakened state, and Allah caused a plant to grow over him. The account then describes his mission to a great number of people who believed and were allowed enjoyment for a time. Another passage presents his experience as a warning against impatience while affirming that Allah chose him among the righteous.
The prayer of combined recognition of Allah's perfection with admission of personal wrong. He did not treat his situation as beyond mercy. The account teaches us to turn back honestly, without using our failure as a reason to stop calling upon Allah.
The account in Sūrah al-Qalam uses the experience of in a warning about patience. A difficult response from others does not make every departure wise. The lesson is to remain faithful to the duty Allah has given, while seeking His help with frustration.
Summaries of Ibn Kathīr's commentary on the linked āyāt, with authentic ḥadīth noted in the text where used. Verse links open Quran.com text and your chosen translation.