The king of elephants, Gajendra, found himself in a difficult spot. After spending some leisurely time in the water with his female friends, the fun stopped when one of his legs was locked by the jaws of a menacing crocodile. Recalling his habit of prayer from his former life as a human, he suddenly took to such supplication, calling on help from Vishnu. Vishnu responded to the devotional plea of the elephant and set him free from the perilous mouth of the reptile.
The above story, outlined in C