Deuteronomy 9:4-5

JPS_ASV_Byz(i) 4 Speak not thou in thy heart, after that the LORD thy God hath thrust them out from before thee, saying: 'For my righteousness the LORD hath brought me in to possess this land'; whereas for the wickedness of these nations the LORD doth drive them out from before thee. 5 Not for thy righteousness, or for the uprightness of thy heart, dost thou go in to possess their land; but for the wickedness of these nations the LORD thy God doth drive them out from before thee, and that He may establish the word which the LORD swore unto thy fathers, to Abraham, to Isaac, and to Jacob.