Srimad-Bhagavatam: Canto 6 - Chapter 1 - Verse 13


अथैनं मापनयत कृताशेषाघनिष्कृतम् ।यदसौ भगवन्नाम म्रियमाण: समग्रहीत् ॥ १३ ॥


athainaṁ māpanayatakṛtāśeṣāgha-niṣkṛtamyad asau bhagavan-nāmamriyamāṇaḥ samagrahīt


At the time of death, this Ajāmila helplessly and very loudly chanted the holy name of the Lord, Nārāyaṇa. That chanting alone has already freed him from the reactions of all sinful life. Therefore, O servants of Yamarāja, do not try to take him to your master for punishment in hellish conditions.


The Viṣṇudūtas, who are superior authorities, gave orders to the Yamadūtas, who did not know that Ajāmila was no longer subject to tribulation in hellish life for his past sins. Although he had chanted the holy name Nārāyaṇa to indicate his son, the holy name is so transcendentally powerful that he was automatically freed because he had chanted the holy name while dying (ante nārāyaṇa-smṛtiḥ). As Kṛṣṇa confirms in Bhagavad-gītā (7.28): “Persons who have acted piously in previous lives and in this life, whose sinful actions are completely eradicated and who are freed from the duality of delusion, engage themselves in My service with determination.” Unless one is freed from all sinful reactions, one cannot be promoted to the platform of devotional service. Elsewhere in Bhagavad-gītā (8.5) it is stated: If one remembers Kṛṣṇa, Nārāyaṇa, at the time of death, one is certainly eligible to return immediately home, back to Godhead.