Shri Vishnu Saving the Elephant Gajendra, Pahari region, Guler, circa 1760.
Gajendra was the king of elephants. One hot day, he was cooling off in a lake when a crocodile attacked him, and he could not free himself. Gajendra prayed to the god Shri Vishnu to save him. When Lord Vishnu appeared, Gajendra offered Him a lotus bloom. Shri Vishnu overcame the crocodile and saved His devotee.
In his previous Gajendra was Indrayumna, a great king and devotee of Vishnu. Indradyumna once failed to receive the sage Agastya with due respect. The enraged Agastya cursed the king to become an elephant in his next birth, as he sat heavy on his seat and did not rise to greet him.
The crocodile in its last life was a king called HuHu in the Gandharva planet. Once while enjoying himself in the waters, he pulled the leg of a sage. The enraged sage cursed the king to become a crocodile in his next life. The repentant HuHu asked for pardon. The Sage proclaimed that though he could not retrieve the curse, the crocodile would be liberated from the cycle of birth and death when Gajendra would be saved by the Lord God Himself.