In a forest on the mount Trikoota there lived an elephant who was the king of the surroundings. There was a garden there which belonged to the ocean of gods, Lord Varuna.The place was decked with beautiful rivers, lakes, celestial trees and plants. The water in these lakes and rivers was always as sweet as sugar and was very fresh. Tiny sparkling gems lay scattered on the banks of the rivulets. The trees here were adorned with beautiful flowers and the juiciest fruits. The garden was so beautiful and was loaded with charm that it attracted the apsaras who used to descend to the earth and played and enjoyed.
It was a very hot sunny day and Gajendra, the elephant king came to the garden of Varuna with his entire family. Gajendra was not able to bear the heat, so he got into one of the cool lakes to get himself refreshed. He quenched his thirst by drinking the sweet water and also passed some to the elephants which came along with Gajendra. As he was passing the water he felt his feet was suddenly attacked by a powerful crocodile. The crocodile caught his feet tight and started to drag him into the water.
Gajendra tried and strugged very hard to release himself from the clutches of the wicked crocodile. The other elephants in the herd did not know what to do so they screamed and shrieked. The elephants cried loudly as they were trying to pull their head out of the water from the vicious animal. Gajendra also tried his best to escape but all his attempts and efforts failed miserably. Gajendra was very exhausted and before he could leave his fate to nature he turned his thoughts to the Lord and prayed ardently to him for help. The moment Gajendra requested for Sri Hari's help, the Lord immediately along with the other devas mounted on his garuda and took off to help Gajendra. He pulled the crocodile out of the water and split open its mouth with his divine chakra. Atlast Gajendra was released from the clutches of the crocodile and death.
The crocodile who was a gandharva by name Huhu was once having his bath in a tank and there came the rishi Devala to have his bath. Huhu tried playing tricks to the rishi who became very angry and cursed the gandharva to turn to a crocodile. Thus Huhu was released from the curse only after the touch of the Lord Sri Vishnu. Just like the crocodile, Gajendra was also cursed by the famous sage Agasthya. Gajendra was a Pandaya king by name Indradyumna who was an ardent devotee of Sri Hari and once he went in for a silent meditation on the top of a mountain. During that time sage Agasthya and his disciples came to Indradyumna ashram. Because Indradyumna was lost in his meditation and his thoughts about Sri Vishnu he did not receive them with reverence. So Agasthya got angry and cursed Indradyumna that he being like a dull witted elephant, will be born as an elephant itself. This is how Indradyumna became an elephant and even as an elephant, retained, to some extent, his devotion to the Lord from his previous birth. Thus when Indradyumna was desperate for his life he called out for Sri Hari’ s help and the Lord helped him from the doorstep of death.