Deuteronomy 9:5-7

YLT(i) 5 not for thy righteousness, and for the uprightness of thy heart, art thou going in to possess their land; but for the wickedness of these nations is Jehovah thy God dispossessing them from before thee; and in order to establish the word which Jehovah hath sworn to thy fathers, to Abraham, to Isaac, and to Jacob; 6 and thou hast known, that not for thy righteousness is Jehovah thy God giving to thee this good land to possess it, for a people stiff of neck thou art .
7 `Remember—do not forget—that with which thou hast made Jehovah thy God wroth in the wilderness; even from the day that thou hast come out of the land of Egypt till your coming in unto this place rebels ye have been with Jehovah;