Srimad Bhagavatam Canto 06, Chapter 02, Text 49

SB 6.2.49

mriyamano harer nama
 grnan putropacaritam
ajamilo ’py agad dhama
 kim uta sraddhaya grnan
Translation by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
While suffering at the time of death, Ajamila chanted the holy name of the Lord, and although the chanting was directed toward his son, he nevertheless returned home, back to Godhead. Therefore if one faithfully and inoffensively chants the holy name of the Lord, where is the doubt that he will return to Godhead?
Purport by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
At the time of death one is certainly bewildered because his bodily functions are in disorder. At that time, even one who throughout his life has practiced chanting the holy name of the Lord may not be able to chant the Hare Krsna mantra very distinctly. Nevertheless, such a person receives all the benefits of chanting the holy name. While the body is fit therefore, why should we not chant the holy name of the Lord loudly and distinctly? If one does so, it is quite possible that even at the time of death he will be properly able to chant the holy name of the Lord with love and faith. In conclusion, one who chants the holy name of the Lord constantly is guaranteed to return home, back to Godhead, without a doubt.
Supplementary note to this chapter.
Srila Visvanatha Cakravarti Thakura’s commentary to texts 9 and 10 of this chapter form a dialogue concerning how one can become free from all sinful reactions simply by chanting the holy name of the Lord.
Someone may say, “It may be accepted that by chanting the holy name of the Lord one becomes freed from all the reactions of sinful life. However, if one commits sinful acts in full consciousness, not only once but many, many times, he is unable to free himself from the reactions of such sins even after atoning for them for twelve years or more. How is it possible, then, that simply by once chanting the holy name of the Lord one immediately becomes freed from the reactions of such sins?”
Srila Visvanatha Cakravarti Thakura replies by quoting verses 9 and 10 of this chapter: “The chanting of the holy name of Lord Visnu is the best process of atonement for a thief of gold or other valuables, for a drunkard, for one who betrays a friend or relative, for one who kills a brahmana, or for one who indulges in sex with the wife of his guru or another superior. It is also the best method of atonement for one who murders women, the king or his father, for one who slaughters cows, and for all other sinful men. Simply by chanting the holy name of Lord Visnu, such sinful persons may attract the attention of the Supreme Lord, who therefore considers “Because this man has chanted My holy name, My duty is to give him protection.’”
One may atone for sinful life and vanquish all sinful reactions by chanting the holy name, although this is not called atonement. Ordinary atonement may temporarily protect a sinful person, but it does not completely cleanse his heart of the deep-rooted desire to commit sinful acts. Therefore atonement is not as powerful as the chanting of the holy name of the Lord. In the sastras it is said that if a person only once chants the holy name and completely surrenders unto the lotus feet of the Lord, the Lord immediately considers him His ward and is always inclined to give him protection. This is confirmed by Sridhara Svami. Thus when Ajamila was in great danger of being carried off by the order carriers of Yamaraja, the Lord immediately sent His personal order carriers to protect him, and because Ajamila was freed from all sinful reactions, the Visnudutas spoke on his behalf.
Ajamila had named his son Narayana, and because he loved the boy very much, he would call him again and again. Although he was calling for his son, the name itself was powerful because the name Narayana is not different from the Supreme Lord Narayana. When Ajamila named his son Narayana, all the reactions of his sinful life were neutralized, and as he continued calling his son and thus chanting the holy name of Narayana thousands of times, he was actually unconsciously advancing in Krsna consciousness.
One may argue, “Since he was constantly chanting the name of Narayana, how was it possible for him to be associating with a prostitute and thinking of wine?” By his sinful actions he was bringing suffering upon himself again and again, and therefore one may say that his ultimate chanting of Narayana was the cause of his being freed. However, his chanting would then have been a nama-aparadha. Namno balad yasya hi papa-buddhih: one who continues to act sinfully and tries to neutralize his sins by chanting the holy name of the Lord is a nama-aparadhi, an offender to the holy name. In response it may be said that Ajamila’s chanting was inoffensive because he did not chant the name of Narayana with the purpose of counteracting his sins. He did not know that he was addicted to sinful actions, nor did he know that his chanting of the name of Narayana was neutralizing them. Thus he did not commit a nama-aparadha, and his repeated chanting of the holy name of Narayana while calling his son may be called pure chanting. Because of this pure chanting, Ajamila unconsciously accumulated the results of bhakti. Indeed, even his first utterance of the holy name was sufficient to nullify all the sinful reactions of his life. To cite a logical example, a fig tree does not immediately yield fruits, but in time the fruits are available. Similarly, Ajamila’s devotional service grew little by little, and therefore although he committed very sinful acts, the reactions did not affect him. In the sastras it is said that if one chants the holy name of the Lord even once, the reactions of past, present or future sinful life do not affect him. To give another example, if one extracts the poison fangs of a serpent, this saves the serpent’s future victims from poisonous effects, even if the serpent bites repeatedly. Similarly, if a devotee chants the holy name even once inoffensively, this protects him eternally. He need only wait for the results of the chanting to mature in due course of time.
Thus end the Bhaktivedanta purports of the Sixth Canto, Second Chapter, of the Srimad-Bhagavatam, entitled “Ajamila Delivered by the Visnudutas.”
Srimad Bhagavatam Canto 06, Chapter 02, Text 47-48
Srimad Bhagavatam Canto 06, Chapter 02 Overview