Deuteronomy 9:5

5 It is not because you are good and do what is right that the Lord is letting you take their land. He will drive them out because they are wicked and because he intends to keep the promise that he made to your ancestors, Abraham, Isaac, and Jacob.

Deuteronomy 9:5 In-Context

3 But now you will see for yourselves that the Lord your God will go ahead of you like a raging fire. He will defeat them as you advance, so that you will drive them out and destroy them quickly, as he promised.
4 "After the Lord your God has driven them out for you, do not say to yourselves that he brought you in to possess this land because you deserved it. No, the Lord is going to drive these people out for you because they are wicked.
5 It is not because you are good and do what is right that the Lord is letting you take their land. He will drive them out because they are wicked and because he intends to keep the promise that he made to your ancestors, Abraham, Isaac, and Jacob.
6 You can be sure that the Lord is not giving you this fertile land because you deserve it. No, you are a stubborn people.
7 "Never forget how you made the Lord your God angry in the desert. From the day that you left Egypt until the day you arrived here, you have rebelled against him.
Scripture taken from the Good News Translation - Second Edition, Copyright 1992 by American Bible Society. Used by Permission.