Bhagavad Gita · 14.15
रजसि प्रलयं गत्वा कर्मसङ्गिषु जायते।तथा प्रलीनस्तमसि मूढयोनिषु जायते॥
rajasi pralayaṁ gatvā karma-saṅgiṣhu jāyate tathā pralīnas tamasi mūḍha-yoniṣhu jāyate
Dying in the mode of passion, one is born among those attached to action. Dying in ignorance, one takes birth in the wombs of the deluded.
— Bhagavad Gita 14.15
Source: Sacred-Texts.com (Sanskrit) + Bhagavad-Gita.io (translations)