Now when Moses saw that the people were unrestrained (for Aaron had not restrained them, to their shame among their enemies), then Moses stood in the entrance of the camp, and said, “Whoever is on the LORD’s side—come to me!” And all the sons of Levi gathered themselves together to him. And he said to them, “Thus says the LORD God of Israel: ‘Let every man put his sword on his side, and go in and out from entrance to entrance throughout the camp, and let every man kill his brother, every man his companion, and every man his neighbor.’ ” So the sons of Levi did according to the word of Moses. And about three thousand men of the people fell that day. Then Moses said, “Consecrate yourselves today to the LORD, that He may bestow on you a blessing this day, for every man has opposed his son and his brother.”
Now it came to pass on the next day that Moses said to the people, “You have committed a great sin. So now I will go up to the LORD; perhaps I can make atonement for your sin.” Then Moses returned to the LORD and said, “Oh, these people have committed a great sin, and have made for themselves a god of gold! Yet now, if You will forgive their sin—but if not, I pray, blot me out of Your book which You have written.”
And the LORD said to Moses, “Whoever has sinned against Me, I will blot him out of My book. Now therefore, go, lead the people to the place of which I have spoken to you. Behold, My Angel shall go before you. Nevertheless, in the day when I visit for punishment, I will visit punishment upon them for their sin.”
So the LORD plagued the people because of what they did with the calf which Aaron made.