Bhagavad Gita 13.22

Chapter 13: The field and its knower

पुरुषः प्रकृतिस्थो हि भुङ्‌क्ते प्रकृतिजान्गुणान् ।
कारणं गुणसङ्गोऽस्य सदसद्योनिजन्मसु ॥ २२ ॥

Spirit seated in Matter useth the qualities born of Matter; attachment to the qualities is the cause of his births in good and evil wombs.

Sanskrit text and English translation: Annie Besant, The Bhagavad-Gita, 4th edition (1922) — public domain, via Wikisource. Chapter summaries: SamayaVeda.