Exodus 32:25-35

NASB
New American Standard Bible

25Now when Moses saw that the people were out of control-for Aaron had let them get out of control to be a derision among their enemies- 26then Moses stood in the gate of the camp, and said, "Whoever is for the Lord, come to me!" And all the sons of Levi gathered together to him. 27He said to them, "Thus says the Lord, the God of Israel, 'Every man of you put his sword upon his thigh, and go back and forth from gate to gate in the camp, and kill every man his brother, and every man his friend, and every man his neighbor.'" 28So the sons of Levi did as Moses instructed, and about three thousand men of the people fell that day. 29Then Moses said, "Dedicate yourselves today to the Lord-for every man has been against his son and against his brother-in order that He may bestow a blessing upon you today."
30On the next day Moses said to the people, "You yourselves have committed a great sin; and now I am going up to the Lord, perhaps I can make atonement for your sin." 31Then Moses returned to the Lord, and said, "Alas, this people has committed a great sin, and they have made a god of gold for themselves. 32But now, if You will, forgive their sin-and if not, please blot me out from Your book which You have written!" 33The Lord said to Moses, "Whoever has sinned against Me, I will blot him out of My book. 34But go now, lead the people where I told you. Behold, My angel shall go before you; nevertheless in the day when I punish, I will punish them for their sin." 35Then the Lord smote the people, because of what they did with the calf which Aaron had made.