Deuteronomy 9:4-5

Leeser(i) 4 Thou must not say in thy heart, when the Lord thy God doth cast them out from before thee, as followeth, For my righteousness hath the Lord brought me in to possess this land; and that for the wickedness of these nations the Lord doth drive them out from before thee. 5 Not for thy righteousness, nor for the uprightness of thy heart, dost thou go in to possess their land; but for the wickedness of these nations doth the Lord thy God drive them out from before thee, and in order that he may fulfill the word which the Lord hath sworn unto thy fathers, to Abraham, to Isaac, and to Jacob.