Chapter 7 · Knowledge and Realisation · Krishna said
Bhagavad Gita 7.30 — Knowing God even at death
साधिभूताधिदैवं मां साधियज्ञं च ये विदुः। प्रयाणकालेऽपि च मां ते विदुर्युक्तचेतसः ॥
sādhibhūtādhidaivaṃ māṃ sādhiyajñaṃ ca ye viduḥ | prayāṇakāle'pi ca māṃ te viduryuktacetasaḥ ||
Meaning
Those who know me as the basis of the material world, of the divine powers and of sacrifice, with steady minds, know me even at the hour of death.