Deuteronomy 9:5

5 "It is 1not for your righteousness or for the uprightness of your heart that you are going to possess their land, but it is because of the wickedness of these nations that the LORD your God is driving them out before * you, in order to confirm 2the oath which the LORD swore to your fathers, to Abraham, Isaac and Jacob.