Deuteronomy 9:4-5

BBE(i) 4 And after the Lord has sent them in flight from before you, say not in your heart, Because of my righteousness the Lord has given me this land; when it is because of their evil-doing that the Lord is driving these nations out before you. 5 Not for your righteousness or because your hearts are upright are you going in to take their land; but because of the evil-doing of these nations the Lord your God is driving them out from before you, and to give effect to his oath to your fathers, Abraham, Isaac, and Jacob.