Moses, Eleazar the priest, and the chiefs of the community went to meet them outside the camp.
Moses became angry with the commanders of the army, the officers of thousands and the officers of hundreds, who came back from the battle.
Moses said to them, "Have you let all the women live?
These very women, on Balaam's advice, made the Israelites break faith with the LORD in the affair at Peor, so there was a plague among the LORD's community.
Now kill every male child and every female who has known a man intimately by sleeping with him.
But all the young girls who have not known a man intimately by sleeping with him, spare for yourselves.
You will remain outside the camp for seven days. Everyone among you or your captives who has killed a person or touched a corpse must purify themselves on the third and seventh days.
You must also purify every garment, and everything made of leather, goats' hair, or wood."