Bhagavad Gita · 8.5
अन्तकाले च मामेव स्मरन्मुक्त्वा कलेवरम्।यः प्रयाति स मद्भावं याति नास्त्यत्र संशयः॥
anta-kāle cha mām eva smaran muktvā kalevaram yaḥ prayāti sa mad-bhāvaṁ yāti nāsty atra sanśhayaḥ
Whoever, at the time of death, departs remembering Me alone, leaving the body, attains My nature. Of this there is no doubt.
— Bhagavad Gita 8.5
Source: Sacred-Texts.com (Sanskrit) + Bhagavad-Gita.io (translations)