Numbers 31
14 Ref And Moses was angry with the chiefs of the army, the captains of thousands and the captains of hundreds who had come back from the war.
15 Ref And Moses said to them, Why have you kept all the women safe?
16 Ref It was these who, moved by Balaam, were the cause of Israel's sin against the Lord in the question of Peor, because of which disease came on the people of the Lord.
17 Ref So now put every male child to death, and every woman who has had sex relations with a man.
18 Ref But all the female children who have had no sex relations with men, you may keep for yourselves.