Deuteronomy 9:3-5
9:3 Understand today that the Lord your God who goes before you is a devouring fire; he will defeat and subdue them before you. You will dispossess and destroy them quickly just as he has told you.
9:4 Do not think to yourself after the Lord your God has driven them out before you, “Because of my own righteousness the Lord has brought me here to possess this land.” It is because of the wickedness of these nations that the Lord is driving them out ahead of you.
9:5 It is not because of your righteousness, or even your inner uprightness, that you have come here to possess their land. Instead, because of the wickedness of these nations the Lord your God is driving them out ahead of you in order to confirm the promise he made on oath to your ancestors, to Abraham, Isaac, and Jacob.