Deuteronomy 9:4-6 - WEB
4
Don`t speak in your heart, after that Yahweh your God has thrust them out from before you, saying, For my righteousness Yahweh has brought me in to possess this land; whereas for the wickedness of these nations Yahweh does drive them out from before you.
5
Not for your righteousness, or for the uprightness of your heart, do you go in to possess their land; but for the wickedness of these nations Yahweh your God does drive them out from before you, and that he may establish the word which Yahweh swore to your fathers, to Abraham, to Isaac, and to Jacob.
6
Know therefore, that Yahweh your God doesn`t give you this good land to possess it for your righteousness; for you are a stiff-necked people.
Full Chapter