Deuteronomy 9:4-5

VIN(i) 4 "You shall not say to yourself when the LORD your God is driving them out before you, saying, 'Because of my righteousness the LORD brought me to take possession of this land'; but because of the wickedness of these nations the LORD is driving them out before you. 5 It is not because of your righteousness and because of the uprightness of your heart that you are coming to take possession of their land, but because of the wickedness of these nations the LORD your God is driving them before you, and in order to confirm the promise that the LORD swore to your ancestors, to Abraham, to Isaac, and to Jacob.