Ajāmila was a brāhmaṇa who because of bad association had given up all brahminical culture and religious principles. Becoming most fallen, he stole, drank and performed other abominable acts. He even kept a prostitute. Thus he was destined to be carried away to hell by the order carriers of Yamarāja, but he was immediately rescued simply by a glimpse of the chanting of the holy name Nārāyaṇa.
Srimad Bhagavata Purana
श्रीमद्भागवतमहापुराणम्
मूल श्लोकः
एवं स विप्लावितसर्वधर्मा दास्याः पतिः पतितो गर्ह्यकर्मणा । निपात्यमानो निरये हतव्रतः सद्यो विमुक्तो भगवन्नाम गृह्णन्
evaṃ sa viplāvitasarvadharmā dāsyāḥ patiḥ patito garhyakarmaṇā | nipātyamāno niraye hatavrataḥ sadyo vimukto bhagavannāma gṛhṇan
SB 6.2.45