Deuteronomy 9:4-5

Thomson(i) 4 Now when the Lord thy God hath destroyed those nations from before thee, speak not in thy heart, saying, On the account of my righteousness the Lord hath brought me in to possess this good land. It is not on the account of thy righteousness, nor for the sanctity of thy heart, that thou goest in to possess their land; but, because of the wickedness of those nations, the Lord will drive them out from before thee, 5 and that he may establish his covenant which the Lord made with our fathers; with Abraham, and Isaak, and Jacob.