Deuteronomy 9:5-15

5 Not for your righteousness or because your hearts are upright are you going in to take their land; but because of the evil-doing of these nations the Lord your God is driving them out from before you, and to give effect to his oath to your fathers, Abraham, Isaac, and Jacob.
6 Be certain then that the Lord your God is not giving you this good land as a reward for your righteousness; for you are a stiff-necked people.
7 Keep well in mind how you made the Lord your God angry in the waste land; from the day when you went out of Egypt till you came to this place, you have gone against the orders of the Lord.
8 Again in Horeb you made the Lord angry, and in his wrath he would have put an end to you.
9 When I had gone up into the mountain to be given the stones on which was recorded the agreement which the Lord made with you, I was on the mountain for forty days and forty nights without taking food or drinking water.
10 And the Lord gave me the two stones with writing on them done by the finger of God: on them were recorded all the words which the Lord said to you on the mountain out of the heart of the fire, on the day of the great meeting.
11 Then at the end of forty days and forty nights the Lord gave me those stones, the stones of the agreement.
12 And the Lord said to me, Get up now, and go down quickly from this place; for the people you have taken out of Egypt have given themselves over to evil; they have quickly been turned from the way in which I gave them orders to go; they have made themselves a metal image.
13 And then the Lord said to me, I have seen that this people is stiff-necked:
14 Let me send destruction on them till their very name is cut off; and I will make of you a nation greater and stronger than they.
15 So turning round I came down from the mountain, and the mountain was burning with fire; and the two stones of the agreement were in my hands.