Surah Al-'Ankabut, ayah 65

29:65

فَإِذَا رَكِبُواْ فِي ٱلۡفُلۡكِ دَعَوُاْ ٱللَّهَ مُخۡلِصِينَ لَهُ ٱلدِّينَ فَلَمَّا نَجَّىٰهُمۡ إِلَى ٱلۡبَرِّ إِذَا هُمۡ يُشۡرِكُونَ ٦٥

Fa idhā rakibū fil-fulki da'awullāha mukhlisīna lahud-dīna falammā najjāhum ilal-barri idhā hum yushrikūn

And when they board a ship, they supplicate Allāh, sincere to Him in religion [i.e., faith and hope]. But when He delivers them to the land, at once they associate others with Him