Numbers 31:14 - 31:18
14 And Moses was angry with the officers of the army, the commanders of thousands and the commanders of hundreds, who had come from service in the war. 15 So Moses said to them, “Have you spared all the women? 16 Behold, these caused the sons of Israel, through the word of Balaam, to act unfaithfully against Yahweh in the matter of Peor, so the plague was among the congregation of Yahweh. 17 So now, kill every male among the little ones, and kill every woman who has known man intimately. 18 But all the girls who have not known man intimately, spare for yourselves.