Bhagavad Gita 17.19
Chapter 17: The three kinds of faith
मूढग्राहेणात्मनो यत्पीडया क्रियते तपः ।
परस्योत्सादनार्थं वा तत्तामसमुदाहृतम् ॥ १९ ॥
That austerity done under a deluded understanding, with self-torture, or with the object of destroying another, that is declared of darkness.
Sanskrit text and English translation: Annie Besant, The Bhagavad-Gita, 4th edition (1922) — public domain, via Wikisource. Chapter summaries: SamayaVeda.