17 When Joshua heard the noise of the people as they shouted, he said to Moses, “There is a noise of war in the camp.” 18 But he said, “It is not the sound of shouting for victory, or the sound of the cry of defeat, but the sound of singing that I hear.” 19 And as soon as he came near the camp and saw the calf and the dancing, Moses' anger burned hot, and he threw the tablets out of his hands and broke them at the foot of the mountain. 20 He took the calf that they had made and burned it with fire and ground it to powder and scattered it on the water and made the people of Israel drink it.
21 And Moses said to Aaron, “What did this people do to you that you have brought such a great sin upon them?” 22 And Aaron said, “Let not the anger of my lord burn hot. You know the people, that they are set on evil. 23 For they said to me, ‘Make us gods who shall go before us. As for this Moses, the man who brought us up out of the land of Egypt, we do not know what has become of him.’ 24 So I said to them, ‘Let any who have gold take it off.’ So they gave it to me, and I threw it into the fire, and out came this calf.”
25 And when Moses saw that the people had broken loose (for Aaron had let them break loose, to the derision of their enemies), 26 then Moses stood in the gate of the camp and said, “Who is on the Lord's side? Come to me.” And all the sons of Levi gathered around him. 27 And he said to them, “Thus says the Lord God of Israel, ‘Put your sword on your side each of you, and go to and fro from gate to gate throughout the camp, and each of you kill his brother and his companion and his neighbor.’” 28 And the sons of Levi did according to the word of Moses. And that day about three thousand men of the people fell. 29 And Moses said, “Today you have been ordained for the service of the Lord, each one at the cost of his son and of his brother, so that he might bestow a blessing upon you this day.”
30 The next day Moses said to the people, “You have sinned a great sin. And now I will go up to the Lord; perhaps I can make atonement for your sin.” 31 So Moses returned to the Lord and said, “Alas, this people has sinned a great sin. They have made for themselves gods of gold. 32 But now, if you will forgive their sin—but if not, please blot me out of your book that you have written.” 33 But the Lord said to Moses, “Whoever has sinned against me, I will blot out of my book. 34 But now go, lead the people to the place about which I have spoken to you; behold, my angel shall go before you. Nevertheless, in the day when I visit, I will visit their sin upon them.”
35 Then the Lord sent a plague on the people, because they made the calf, the one that Aaron made. (ESV)