So he stood at the entrance to the camp and said, “Whoever is for the LORD, come to me.” And all the Levites rallied to him.
Then he said to them, “This is what the LORD, the God of Israel, says: ‘Each man strap a sword to his side. Go back and forth through the camp from one end to the other, each killing his brother and friend and neighbor.’ ”
References for Exodus 32:27
The Levites did as Moses commanded, and that day about three thousand of the people died.
Then Moses said, “You have been set apart to the LORD today, for you were against your own sons and brothers, and he has blessed you this day.”