Deuteronomy 9:1-6

9:1 Hear, Israel! You are to pass over the Jordan today, to go in to dispossess nations greater and mightier than yourself, cities great and fortified up to the sky,

9:2 a people great and tall, the sons of the Anakim, whom you know, and of whom you have heard say, “Who can stand before the sons of Anak?”

9:3 Know therefore today that the LORD your God is he who goes over before you as a devouring fire. He will destroy them and he will bring them down before you. So you shall drive them out and make them perish quickly, as the LORD has spoken to you.

9:4 Don’t say in your heart, after the LORD your God has thrust them out from before you, “For my righteousness the LORD has brought me in to possess this land;” because the LORD drives them out before you because of the wickedness of these nations.

9: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 the LORD your God does drive them out from before you, and that he may establish the word which the LORD swore to your fathers, to Abraham, to Isaac, and to Jacob.

9:6 Know therefore that the LORD your God doesn’t give you this good land to possess for your righteousness, for you are a stiff-necked people.