Fortunately he remembered that prayer and began to chant it to himself. Gajendra Moksha Stotra in Hindi and Sanskrit – Hindi-Web. Gajendra Moksha Stotram is a prayer to Lord Vishnu by Gajendra, the King of Elephants, when a crocodile caught hold of him.
Yogino yam prapasyanthi, yogesam tham nathosyam aham||, Namo namasthubhyam asahya veda shakthi thrayaya akhiladhi gunaaya, Gajendra Sthuthi (The prayer by the king of elephants) Translated by P.R.Ramachander ( This prayer has been taken from eighth Skanda and third chapter of Bhagwatha Purana (Sloka 2-29).