Bhagavad Gita 14.15

रजसि प्रलयं गत्वा कर्मसङ्गिषु जायते।तथा प्रलीनस्तमसि मूढयोनिषु जायते ॥१४.१५॥

rajasi pralayaṃ gatvā karmasaṅgiṣu jāyatetathā pralīnastamasi mūḍhayoniṣu jāyate

Meeting death in Rajas, he is born among those who are attached to action; and dying in Tamas, he is born in the womb of the thoughtless.

गीता