Deuteronomy 9:4
Speak not thou in thine heart, after that the Lord thy God hath cast them out from before thee, saying, For my righteousness the Lord hath brought me in to possess this land: but for the wickedness of these nations the Lord doth drive them out from before thee. (Deuteronomy 9:4)
Wickedness.
 When Abraham sojourned in Canaan “the iniquity of the Amorites” was “not yet full” (Gen. 15:16). During their 215 years in Canaan, Abraham and his descendants bore a faithful witness to the true God, so that the inhabitants of the land might have an opportunity to amend their ways. It was not until the nations of Canaan had irretrievably sinned away their day of grace that God dispossessed them of their land (see Lev. 18:24-28; 1 Kings 14:23, 24; 21:26).
My righteousness.
 Their evil conduct since leaving Egypt made it evident that they were not being given the land of Canaan because they deserved it (vs. 7-27).