Qur'an, Al-Qalam, Surah 68:48-50
So wait with patience for the Command of thy Lord, and be not like the Companion of the Fish, when he cried out in agony. Had not Grace from his Lord reached him, he would indeed have been cast off on the naked shore, in disgrace.
Thus did his Lord choose him and make him of the Company of the Righteous.