Deuteronomy 9:4

4 "Do not say in your heart, after the LORD your God has thrust them out before you, 'It is because of my righteousness that the LORD has brought me in to possess this land'; whereas it is because of the wickedness of these nations that the LORD is driving them out before you.

Deuteronomy 9:4 In-Context

2 a people great and tall, the sons of the Anakim, whom you know, and of whom you have heard it said, 'Who can stand before the sons of Anak?'
3 Know therefore this day that he who goes over before you as a devouring fire is the LORD your God; he will destroy them and subdue them before you; so you shall drive them out, and make them perish quickly, as the LORD has promised you.
4 "Do not say in your heart, after the LORD your God has thrust them out before you, 'It is because of my righteousness that the LORD has brought me in to possess this land'; whereas it is because of the wickedness of these nations that the LORD is driving them out before you.
5 Not because of your righteousness or the uprightness of your heart are you going in to possess their land; but because of the wickedness of these nations the LORD your God is driving them out from before you, and that he may confirm the word which the LORD swore to your fathers, to Abraham, to Isaac, and to Jacob.
6 "Know therefore, that the LORD your God is not giving you this good land to possess because of your righteousness; for you are a stubborn people.
Revised Standard Version of the Bible, copyright 1952 [2nd edition, 1971] by the Division of Christian Education of the National Council of the Churches of Christ in the United States of America. Used by permission. All rights reserved.