The Lord spoke to Moses, saying, "Take vengeance on the Midianites for the Israelites. After this, you will be gathered to your people."
So Moses commanded the people, "Select a thousand men from each tribe to go into battle for the Lord's vengeance." Twelve thousand men were chosen—one thousand from every tribe—and Phinehas, son of Eleazar the priest, went with them, carrying the holy articles and the trumpets for sounding the signal.
They fought against Midian just as the Lord commanded and killed every man. Among the slain were the five kings of Midian—Evi, Rekem, Zur, Hur, and Reba. Balaam, son of Beor, who had led Israel into sin, also fell by the sword. The Israelites took the Midianite women and children captive and gathered their flocks, herds, and possessions as plunder. They burned the towns and camps of Midian, taking all the spoils and captives to Moses and Eleazar at the camp in the plains of Moab, across from Jericho.
When they returned, Moses, Eleazar, and the leaders went out to meet them. But Moses was angry with the army officers. "Why have you allowed all the women to live?" he asked. "They are the very ones who followed Balaam's counsel and led Israel into sin at Peor, bringing a plague upon the Lord's people. Now kill every male child and every woman who has slept with a man. But keep alive the young girls who have not known a man."
He then commanded all who had killed or touched the dead to remain outside the camp for seven days. On the third and seventh days, they were to purify themselves and their captives, along with every garment and object made of leather, goat hair, or wood.
Eleazar the priest told them, "This is the law the Lord gave Moses: everything that can withstand fire—gold, silver, bronze, iron, tin, or lead—must be purified by fire and then cleansed with the water of purification. Anything that cannot withstand fire must be purified only with water. On the seventh day, wash your clothes, and you will be clean."
The Lord then said to Moses, "You and Eleazar the priest must count all the people and animals taken captive. Divide the plunder between the soldiers who fought and the rest of the community. From the soldiers' portion, take one out of every five hundred—whether people, cattle, donkeys, or sheep—and give it to Eleazar the priest as the Lord's portion. From the Israelites' half, take one out of every fifty and give it to the Levites who care for the Lord's tabernacle."
So Moses and Eleazar did just as the Lord commanded. The spoils taken were immense: 675,000 sheep, 72,000 cattle, 61,000 donkeys, and 32,000 young women who had not known a man. Half of this went to the soldiers, and from their portion, the tribute to the Lord was given. The other half went to the community, and from it, Moses set apart one out of every fifty for the Levites.
Afterward, the officers of the army came to Moses and said, "We have counted our men, and not one is missing. So we bring this offering to the Lord—gold ornaments we took: armlets, bracelets, rings, earrings, and necklaces—to make atonement for ourselves."
Moses and Eleazar accepted the gold, totaling 16,750 shekels, and brought it into the Tent of Meeting as a memorial before the Lord for all Israel.
