They attacked Midian as the Lord had commanded Moses, and they killed all the men. All five of the Midianite kings—Evi, Rekem, Zur, Hur, and Reba—died in the battle. They also killed Balaam son of Beor with the sword.
Then the Israelite army captured the Midianite women and children and seized their cattle and flocks and all their wealth as plunder. They burned all the towns and villages where the Midianites had lived. After they had gathered the plunder and captives, both people and animals, they brought them all to Moses and Eleazar the priest, and to the whole community of Israel, which was camped on the plains of Moab beside the Jordan River, across from Jericho. Moses, Eleazar the priest, and all the leaders of the community went to meet them outside the camp. But Moses was furious with all the generals and captains[a] who had returned from the battle.
“Why have you let all the women live?” he demanded. “These are the very ones who followed Balaam’s advice and caused the people of Israel to rebel against the Lord at Mount Peor. They are the ones who caused the plague to strike the Lord’s people. So kill all the boys and all the women who have had intercourse with a man. Only the young girls who are virgins may live; you may keep them for yourselves.