Numbers 31:15-17 - WEB
15
Moses said to them, Have you saved all the women alive?
16
Behold, these caused the children of Israel, through the counsel of Balaam, to commit trespass against Yahweh in the matter of Peor, and so the plague was among the congregation of Yahweh.
17
Now therefore kill every male among the little ones, and kill every woman who has known man by lying with him.
Full Chapter