Deuteronomy 9:5-7 English Standard Version Anglicised (ESVUK)
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 that 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. 7 Remember and do not forget how you provoked the Lord your God to wrath in the wilderness. From the day you came out of the land of Egypt until you came to this place, you have been rebellious against the Lord.
Deuteronomy 9:5-7 New International Version (NIV)
5 It is not because of your righteousness or your integrity that you are going in to take possession of their land; but on account of the wickedness of these nations, the Lord your God will drive them out before you, to accomplish what he swore to your fathers, to Abraham, Isaac and Jacob. 6 Understand, then, that it is not because of your righteousness that the Lord your God is giving you this good land to possess, for you are a stiff-necked people.
The Golden Calf
7 Remember this and never forget how you aroused the anger of the Lord your God in the wilderness. From the day you left Egypt until you arrived here, you have been rebellious against the Lord.