Deuteronomy 9:5

5 Not for thy righteousness, nor for the holiness of thy heart, dost thou go in to inherit their land, but because of the wickedness of these nations the Lord will destroy them from before thee, and that he may establish the covenant, which the Lord sware to our fathers, to Abraam, and to Isaac, and to Jacob.