Numbers 31:7-9
31:7 They fought against the Midianites, as the Lord commanded Moses, and they killed every male.
31:8 They killed the kings of Midian in addition to those slain – Evi, Rekem, Zur, Hur, and Reba – five Midianite kings. They also killed Balaam son of Beor with the sword.
31:9 The Israelites took the women of Midian captives along with their little ones, and took all their herds, all their flocks, and all their goods as plunder.
Numbers 31:17-18
31:17 Now therefore kill every boy, and kill every woman who has had sexual intercourse with a man.
31:18 But all the young women who have not had sexual intercourse with a man will be yours.