In the Satya Yuga, there lived a great king by name Indradhyuma, who was the son of King Sumati. He was a spiritual king and great ruler. His people loved him and he took good care of them. Though he was very rich king, he was more interested in spirituality. Soon after his son Parameshthi came of age, Indradhyumna made his son the king and retired to the forests to meditate.
As Indradhyumna was meditating one evening outside his ashrama, Sage Agastiar came to the ashrama with his disciples. Sage Agastiar stood outside waiting for Indradhyumna to open his eyes and receive them. However Indradhyumna was so lost in the meditation that he did not even notice that anyone had come to the ashrama. He remained immersed in his prayers.
Sage Agastiyar waited and waited and finally he lost his temper. 'He does not even stir...He purposely ignores us...You were born in the warrior class and it is your duty to look after the sages and the rishis...' Agastiyar said pointing angrily at the meditating King. 'You have ignored us for this I curse you...I curse you that you will be born an elephant...' Sage Agastiyar's disciples shuddered as they watched Sage Agastiyar's face turn purple with rage, his angavastra flying in the wind.
Sage Agastiyar's disciples felt that Indradhyumna was doomed. The great king would roam the earth as an elephant and meet his end....The disciples along with Sage Agastiyar left the ashrama. The disciples tried their best not to make the sage more angry as he huffed and walked straight without turning...
However king Indradhyumana did not even know the fate he had met at Sage Agaastiyar's hands....
Up in Vaikunta at Lord Vishnu's place, Lord Vishnu smiled when he heard Sage Agastiyar's curse....
Up in the heavens, there was a gandharva called as Huhu. He was singing and dancing with an apsara [a celestial maiden] when they both fell into a lake. Unknown to them, there was a great sage Devala, who was meditating near the lake. As they both fell into the lake, the water from the lake fell on the sage's face. This disturbed the sage's meditation. He opened his eyes angrily and looked around him and saw Huhu and the celestial maiden, looking at him with wide staring eyes. He took his water from his kamandalam, 'YOU DARE DISTURB MY MEDITATION! That is something I cannot forgive..you wretched gandharva...I curse you that you will be born as a crocodile, down on earth...'The sage threw the water on Huhu.
Before Huhu could even open his mouth and talk, he changed into a crocodile and disappeared from there. The apsara talked to the rishi, 'Sir! We did not know you were meditating here, sir! Please forgive him, this is a very harsh punishment for him,,,please sir!' She begged him. The sage looked at the apsara for a long time and closed his eyes. Finally he calmed himself and opened his eyes and spoke to the apsara, 'Huhu will be freed from his curse by Lord Vishnu...do not worry....' Saying thus he went back to his meditation. The apsara realized that the sage would not talk to her anymore, went back to the heavens.
Meanwhile true to Agastiyar's curse, Indradhyumna was born as an elephant in his next birth. He was Gajendra, and he was the king of elephants. As Indradhyumna was some one who had already felt God inside himself, thought he was an elephant, deep inside he still remembered his prayers...Gajendra still performed his puja in the morning and only then went about doing other work.
This went on for some time.
As Gajendra was guiding his herd through the various forests, they came to the beautiful forest in the Mount Trikuta. In between the mountain, there was a very beautiful lake.
It was in this lake that Huhu, the crocodile had made his home. Since the curse of Sage Devala, Huhu was very angry at everyone. He dragged anyone who came to the river to drink water from it, into the water and killed them. It was for this reason that the lake was avoided by all animals. However as Gajendra and his herd were new to the place, they did not know about the lake. As Gajendra was the king, he entered the water first to check whether the water was safe.
Huhu caught hold of Gajendra's feet and dragged Gajendra inside the water. Gajendra, acted fast. He signaled his herd to get back and asked them to stay away from the water. The herd stepped back. Gajendra fought with the crocodile trying to drag the crocodile out of the water and throw him out. However the crocodile was strong. It was proving to be an even battle. However Huhu being a crocodile was in his element – he was in water, where he was strong. Using the water, he was able to drag the elephant further inside the water. Gnajendra's feet was now bleeding and his feet was becoming numb. He realized that he could not win the battle against the crocodile. He told his herd to get back and leave him to his fate. His herd refused, but Gajendra ordered them to get back. Having no choice, the herd went back leaving their king.
After his herd had left, Gajendra tried putting up a fight again, but Huhu was more powerful. With a wail of frustration, Gajendra yelled, 'Adimoolame!'[The source of all Gods]. Gajendra then composed a sloka, praying to Lord Vishnu to come and protect him. [This sloka is called as 'Gajendra Stuthi'].
Gajendra was about to lose his footing totally was about to be dragged inside the water, when he saw the Dark Lord come on Garuda. Gajendra did not even notice that Huhu was dragging his feet away. He just kept staring at the Dark Lord. Lord Vishnu brought out his Sudarshana Chakra and threw it at Huhu. The Sudarshana destroyed Huhu the crocodile and the Gandharva who was trapped inside came out and bowed to the Dark Lord. Lord Vishnu blessed him and the Gandharva went back to the heavens!
Gajendra looked at Lord Vishnu and remained stunned, not able to move. Finally he wiped his tears of joy and bowed to the Lord. 'Lord, you have come and protected me!'
Lord Vishnu smiled, 'You are Indradhyumna, in your last birth Gajendra! A pious man and a great king! You are my greatest devotee and I wanted you to be a part of me always! I am so glad that Sage Agastiyar cursed you to become an elephant. This was the way where I could grant you moksha [salvation] to become a part of me, for all time!'
Gajendra could not talk as tear flowed freely. His Dark Lord had granted him salvation and he would be in Vaikunta with the Dark Lord always!