Deuteronomy 9:1-29 ESV
“Hear, O Israel: you are to cross over the Jordan today, to go in to dispossess nations greater and mightier than you, cities great and fortified up to heaven, 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?’ Know therefore today that he who goes over before you as a consuming 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.
“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. 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.
“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. 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. Even at Horeb you provoked the LORD to wrath, and the LORD was so angry with you that he was ready to destroy you. When I went up the mountain to receive the tablets of stone, the tablets of the covenant that the LORD made with you, I remained on the mountain forty days and forty nights. I neither ate bread nor drank water. And the LORD gave me the two tablets of stone written with the finger of God, and on them were all the words that the LORD had spoken with you on the mountain out of the midst of the fire on the day of the assembly. And at the end of forty days and forty nights the LORD gave me the two tablets of stone, the tablets of the covenant. Then the LORD said to me, ‘Arise, go down quickly from here, for your people whom you have brought from Egypt have acted corruptly. They have turned aside quickly out of the way that I commanded them; they have made themselves a metal image.’
“Furthermore, the LORD said to me, ‘I have seen this people, and behold, it is a stubborn people. Let me alone, that I may destroy them and blot out their name from under heaven. And I will make of you a nation mightier and greater than they.’ So I turned and came down from the mountain, and the mountain was burning with fire. And the two tablets of the covenant were in my two hands. And I looked, and behold, you had sinned against the LORD your God. You had made yourselves a golden calf. You had turned aside quickly from the way that the LORD had commanded you. So I took hold of the two tablets and threw them out of my two hands and broke them before your eyes. Then I lay prostrate before the LORD as before, forty days and forty nights. I neither ate bread nor drank water, because of all the sin that you had committed, in doing what was evil in the sight of the LORD to provoke him to anger. For I was afraid of the anger and hot displeasure that the LORD bore against you, so that he was ready to destroy you. But the LORD listened to me that time also. And the LORD was so angry with Aaron that he was ready to destroy him. And I prayed for Aaron also at the same time. Then I took the sinful thing, the calf that you had made, and burned it with fire and crushed it, grinding it very small, until it was as fine as dust. And I threw the dust of it into the brook that ran down from the mountain.
“At Taberah also, and at Massah and at Kibroth-hattaavah you provoked the LORD to wrath. And when the LORD sent you from Kadesh-barnea, saying, ‘Go up and take possession of the land that I have given you,’ then you rebelled against the commandment of the LORD your God and did not believe him or obey his voice. You have been rebellious against the LORD from the day that I knew you.
“So I lay prostrate before the LORD for these forty days and forty nights, because the LORD had said he would destroy you. And I prayed to the LORD, ‘O Lord GOD, do not destroy your people and your heritage, whom you have redeemed through your greatness, whom you have brought out of Egypt with a mighty hand. Remember your servants, Abraham, Isaac, and Jacob. Do not regard the stubbornness of this people, or their wickedness or their sin, lest the land from which you brought us say, “Because the LORD was not able to bring them into the land that he promised them, and because he hated them, he has brought them out to put them to death in the wilderness.” For they are your people and your heritage, whom you brought out by your great power and by your outstretched arm.’
ESV: English Standard Version 2016