Srimad Bhagavatam Canto 08, Chapter 04, Text 10

SB 8.4.10

tasma imam sapam adad asadhur
 ayam duratmakrta-buddhir adya
vipravamanta visatam tamisram
 yatha gajah stabdha-matih sa eva
 
Translation by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
 
Agastya Muni then spoke this curse against the King: This King Indradyumna is not at all gentle. Being low and uneducated, he has insulted a brahmana. May he therefore enter the region of darkness and receive the dull, dumb body of an elephant.
 
Purport by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
 
An elephant is very strong, it has a very big body, and it can work very hard and eat a large quantity of food, but its intelligence is not at all commensurate with its size and strength. Thus in spite of so much bodily strength, the elephant works as a menial servant for a human being. Agastya Muni thought it wise to curse the King to become an elephant because the powerful King did not receive Agastya Muni as one is obliged to receive a brahmana. Yet although Agastya Muni cursed Maharaja Indradyumna to become an elephant, the curse was indirectly a benediction, for by undergoing one life as an elephant, Indradyumna Maharaja ended the reactions for all the sins of his previous life. Immediately after the expiry of the elephant’s life, he was promoted to Vaikunthaloka to become a personal associate of the Supreme Personality of Godhead, Narayana, in a body exactly like that of the Lord. This is called sarupya-mukti.
Srimad Bhagavatam Canto 08, Chapter 04, Text 09
Srimad Bhagavatam Canto 08, Chapter 04, Text 11-12