Śrīmad-Bhāgavatam · Text 6.2.40
Who is speaking and story frame
स तस्मिन् देवसदन आसीनो योगमास्थित: ।
प्रत्याहृतेन्द्रियग्रामो युयोज मन आत्मनि ॥ ४० ॥
sa tasmin deva-sadana
āsīno yogam āsthitaḥ
pratyāhṛtendriya-grāmo
yuyoja mana ātmani
In Hardwar, Ajāmila took shelter at a Viṣṇu temple, where he executed the process of bhakti-yoga. He controlled his senses and fully applied his mind in the service of the Lord.
Read Śrīla Prabhupāda's purport on Vedabase.io