Bhagavad Gita: Chapter 2, Verse 72

एषा ब्राह्मी स्थितिःपार्थ नैनां प्राप्य विमुह्यति ।
स्थित्वास्यामन्तकालेऽपि ब्रह्मनिर्वाणमृच्छति ॥ २-७२ ॥

eṣā brāhmī sthitiḥ pārtha naināṁ prāpya vimuhyati
sthitvāsyām anta-kāle ’pi brahma-nirvāṇam ṛcchati 2.72

That is the way of the spiritual and godly life, after attaining which a man is not bewildered. If one is thus situated even at the hour of death, one can enter into the kingdom of God.