Srimad Bhagavatam Canto 08, Chapter 03, Text 01

SB 8.3.1

sri-badarayanir uvaca
evam vyavasito buddhya
 samadhaya mano hrdi
jajapa paramam japyam
 prag-janmany anusiksitam
 
Translation by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
 
Sri Sukadeva Gosvami continued: Thereafter, the King of the elephants, Gajendra, fixed his mind in his heart with perfect intelligence and chanted a mantra which he had learned in his previous birth as Indradyumna and which he remembered by the grace of Krsna.
 
Purport by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
 
Such remembrance is described in Bhagavad-gita (6.43-44):
 
tatra tam buddhi-samyogam
 labhate paurva-dehikam
yatate ca tato bhuyah
 samsiddhau kuru-nandana
purvabhyasena tenaiva
 hriyate hy avaso ’pi sah
 
In these verses it is assured that even if a person engaged in devotional service falls down, he is not degraded, but is placed in a position in which he will in due course of time remember the Supreme Personality of Godhead. As explained later, Gajendra was formerly King Indradyumna, and somehow or other in his next life he became King of the elephants. Now Gajendra was in danger, and although he was in a body other than that of a human being, he remembered the stotra he had chanted in his previous life. Yatate ca tato bhuyah samsiddhau kuru-nandana. To enable one to achieve perfection, Krsna gives one the chance to remember Him again. This is proved here, for although the King of the elephants, Gajendra, was put in danger, this was a chance for him to remember his previous devotional activities so that he could immediately be rescued by the Supreme Personality of Godhead.
 
It is imperative, therefore, that all devotees in Krsna consciousness practice chanting some mantra. Certainly one should chant the Hare Krsna mantra, which is the maha-mantra, or great mantra, and also one should practice chanting cintamani-prakara-sadmasu or the Nrsimha strotra (ito nrsimhah parato nrsimho yato yato yami tato nrsimhah). Every devotee should practice in order to chant some mantra perfectly so that even though he may be imperfect in spiritual consciousness in this life, in his next life he will not forget Krsna consciousness, even if he becomes an animal. Of course, a devotee should try to perfect his Krsna consciousness in this life, for simply by understanding Krsna and His instructions, after giving up this body one can return home, back to Godhead. Even if there is some falldown, practice of Krsna consciousness never goes in vain. For example, Ajamila, in his boyhood, practiced chanting the name of Narayana under the direction of his father, but later, in his youth, he fell down and became a drunkard, woman-hunter, rogue and thief. Nonetheless, because of chanting the name of Narayana for the purpose of calling his son, whom he had named Narayana, he became advanced, even though he was involved in sinful activities. Therefore, we should not forget the chanting of the Hare Krsna mantra under any circumstances. It will help us in the greatest danger, as we find in the life of Gajendra.
Srimad Bhagavatam Canto 08, Chapter 03, Text 02