Deuteronomy 9:4-5

MKJV(i) 4 Do not speak in your heart, after Jehovah your God has cast them out from before you, saying: For my righteousness, Jehovah has brought me in to possess this land. But for the wickedness of these nations, Jehovah your God drives them out from before you. 5 Not for your righteousness, or for the uprightness of your heart, do you go to possess their land. But for the wickedness of these nations Jehovah your God drives them out from before you, so that He may perform the Word which Jehovah swore to your fathers, Abraham, Isaac, and Jacob.