Deuteronomy 9:4-5

MSTC(i) 4 Speak not in thine heart, after that the LORD thy God hath cast them out before thee, saying, 'For my righteousness the LORD hath brought me in to possess this land.' Nay, but for the wickedness of these nations the LORD doth cast them out before thee. 5 It is not for thy righteousness' sake and right heart that thou goest to possess their land: But partly for the wickedness of these nations, the LORD thy God doth cast them out before thee, and partly to perform that which the LORD thy God sware unto thy fathers, Abraham, Isaac and Jacob.