Liberation via Thinking of Krsna
Because somehow or other Ajamila became absorbed in thinking of Narayana, or Krsna, at the time of death, he immediately became eligible for liberation, even though he had acted sinfully throughout his entire life. One can think of Krsna in any capacity. The gopis, Krsnas cowherd girlfriends, were absorbed in thinking of Krsna out of what appeared to be lusty desire, Sisupala became absorbed in thinking of Krsna out of anger, and Kamsa incessantly thought of Krsna out of fear. Kamsa and Sisupala were demons, but because they thought of the Supreme Personality of Godhead throughout their lives and at the time of death, they were granted liberation by Krsna Himself.
Of course, it is best if one thinks of Krsna favorably. Bhakti, or devotional service, means thinking favorably of Krsna. Sisupala and Kamsa were not devotees, because the word devotee implies someone who is favorably disposed toward Krsna. Thinking of Krsna in the opposite way, however, is also accepted by Krsna. Krsna is so kind that anyone who thinks of Him always, even as an enemy, becomes the greatest yogi and attains liberation. Thus the results of yogic performances and austerities were achieved even by such inimical personalities as Kamsa and Sisupala. In the impersonal Brahman effulgence (brahmajyoti) we find not only the highest learned scholars (jnanis), who have struggled to attain Brahman, but also those persons who constantly think of Krsna in enmity. They also enter into that spiritual effulgence. Thus the destination achieved by the jnanis is also achieved by the enemies of Krsna. This, however, is not very desirable.
A living entity can remain for some time in the Brahman effulgence (brahmajyoti) as a tiny shining spiritual particle. As there are many molecular particles of sunshine, similarly the living entities can live as small particles of spiritual effulgence in the brahmajyoti. But they are subject to fall down into this material creation again. By nature the living entities want varieties of sense enjoyment, but in that impersonal existence there are no varieties of enjoyment. So when they desire to enjoy, they have to come again to this material world. Therefore, if one merges into the Brahman effulgence, there is every chance of falling down.
Krsnas devotees do not desire liberation, because their only interest is to be engaged in devotional service to Krsna, whether in the material world or in the spiritual world. Still, by the mercy of Krsna, they attain liberation by being elevated to the planet of Goloka Vrndavana, the residence of Krsna, where the material miseries of birth, death, old age, and disease are conspicuous by their absence. Thus a devotees position is different from that of the impersonalists and jnanis. The devotees position is very exalted. He also passes through the Brahman effulgence, but he is not attracted to it. He is attracted to the Vaikuntha planets, especially Goloka Vrndavana, where the Supreme Personality of Godhead lives eternally with His associates.

Link to this page: https://prabhupadabooks.com/sc/4/liberation_via_thinking_of_krsna

If you Love Me Distribute My Books -- Srila Prabhupada