Bhagavad Gita 4.7

यदा यदा हि धर्मस्य ग्लानिर्भवति भारत |
अभ्युत्थानमधर्मस्य तदात्मानं सृजाम्यहम्

Translation

Whenever there is a decline in righteousness and an increase in unrighteousness, O Arjun, at that time I manifest Myself on earth.