Deuteronomy 9:4-5

CAB(i) 4 Speak not in your heart, when the Lord your God has destroyed these nations before your face, saying, For my righteousness the Lord brought me in to inherit this good land. 5 Not for your righteousness, nor for the holiness of your heart, do you go in to inherit their land, but because of the wickedness of these nations, the Lord shall destroy them from before you, and that He may establish the covenant, which the Lord swore to our fathers, to Abraham, Isaac, and Jacob.