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.

Cross-reference

Numbers 31:15 records Moses' rebuke for sparing the women, directly following the capture described here.

Numbers 31:16 explains that these women caused Israel's sin at Peor, justifying their capture and subsequent execution.

Numbers 25:6 Historical context

Numbers 25:6 shows a Midianite woman who caused Israel's sin; verse 9 captures the women in direct response to that incident.

Deuteronomy 20:14 permits taking women and children as plunder, similar to the initial capture here, though later Moses orders killing.