Deuteronomy 9:4-5

LITV(i) 4 Do not say in your heart, when Jehovah your God has cast them out from before you, saying, Jehovah has brought me in to possess this land for my righteousness. But say, Jehovah drives them out from before you because of the wickedness of those nations. 5 It is not for your righteousness or for the uprightness of your heart that you go to possess their land. But Jehovah your God is expelling them from before you because of the wickedness of these nations; and in order to establish the word which Jehovah has sworn to your fathers, to Abraham, to Isaac, and to Jacob.