Numbers 31:9
And the children of Israel took all the women of Midian captives, and their little ones, and took the spoil of all their cattle, and all their flocks, and all their goods. And the children of Israel took all the women of Midian captives, and their little ones, and took the spoil of all their cattle, and all their flocks, and all their goods.
After victory over Midian, Israel took all the Midianite women and their little children as captives and took as spoil all their cattle and flocks and all their goods. In that same battle the men of Midian had been slain, and Balaam also died with them. The campaign was God's judgment upon Midian for leading Israel into sin and for seeking its destruction, with Israel acting as God's instrument rather than from malice or revenge.
The women thus taken were held responsible for leading Israel into sin at Peor and were regarded as its most dangerous enemies. At Moses' command those captured women were afterward put to death because of that role in leading Israel into sin. Although so defeated in Moses' time, the Midianites afterward grew numerous again and became powerful enemies of Israel once more.