The LORD said to Moses,
"Get even with the Midianites for what they did to the Israelites. After that you will join your ancestors [in death]."
Moses said to the people, "Some of your men must get ready to go to war against the Midianites. The LORD will use them to get even with Midian.
Send 1,000 men from each of the tribes of Israel."
So 1,000 men from each tribe were supplied from the divisions of Israel--12,000 men ready for war.
Then Moses sent them off to war, 1,000 men from each tribe along with Phinehas, son of the priest Eleazar. Phinehas took with him the holy articles and the trumpets for the fanfare.
They went to war against Midian, as the LORD commanded Moses, and killed every man.
Among those killed were the five kings of Midian--Evi, Rekem, Zur, Hur, and Reba. They also killed Balaam, son of Beor, in battle.
The Israelites took the Midianite women and children as prisoners of war. They also took all their animals, their livestock, and their valuables as loot.
They burned all the cities where the Midianites lived and all their settlements.
Then they took everything as loot, including all the people and animals,
and brought the prisoners of war, the loot, and everything to Moses, the priest Eleazar, and the community of Israel at the camp on the plains of Moab near the Jordan River across from Jericho.
Moses, the priest Eleazar, and all the leaders of the community went outside the camp to meet them.
Moses was angry with the officers of the army, the commanders of the companies and battalions, who were returning from battle.
"Why did you let all the women live?" he asked them.
"Remember, they were the ones who followed Balaam's advice and caused the Israelites to be unfaithful to the LORD in the incident that took place at Peor. The LORD's community experienced a plague at that time.
So kill all the Midianite boys and every Midianite woman who has gone to bed with a man.
But save for yourselves every girl who has never gone to bed with a man.
"Everyone who killed a person or touched a dead body must stay outside the camp seven days. You and your prisoners of war must use the ritual water on the third and seventh days in order to take away your sin.
Do the same for all the clothes and everything made of leather, goats' hair, or wood."
Then the priest Eleazar said to the soldiers who had gone into battle, "This is what the LORD's teachings told Moses to do:
Any gold, silver, bronze, iron, tin, or lead--
anything that won't burn--must be put through fire in order to make it clean. Then it must also be put through the ritual water in order to take away its sin. Whatever might burn must [only] be put through the ritual water.
On the seventh day wash your clothes, and you will be clean. Then you may come into the camp."
The LORD said to Moses,
"You, the priest Eleazar, and the heads of the families of the community need to count all the loot, including the people and animals you captured.
Divide the loot between the soldiers who served in the war and the rest of the community.
Collect a tax for the LORD. From the soldiers who served in the war collect one out of every 500 things. This includes people, cattle, donkeys, sheep, and goats.
Collect all these things from the soldiers' half of the loot, and give them to the priest Eleazar as a contribution to the LORD.
From the Israelites' half of the loot, collect one out of every 50 things. This includes people, cattle, donkeys, sheep, goats, and every other kind of animal. Give them to the Levites who are in charge of the work done at the LORD's tent."
Moses and the priest Eleazar did as the LORD commanded Moses.
This is the loot that was left from everything that the troops took: 675,000 sheep and goats,
61,000 donkeys, and
32,000 women who had never gone to bed with a man.
Half of it went to the soldiers who served in the war. Of the 337,500 sheep and goats they received,
675 went to the LORD as taxes.
Of the 36,000 cattle they received, 72 went to the LORD as taxes.
Of the 30,500 donkeys they received, 61 went to the LORD as taxes.
Of the 16,000 people they received, 32 went to the LORD as taxes.
Moses gave the LORD's taxes to the priest Eleazar, as the LORD had commanded him.
Moses took the Israelites' half of the loot from the soldiers.
The community received 337,500 sheep and goats,
and 16,000 people.
From the Israelites' half Moses collected one out of every 50 things, including people and animals, as the LORD commanded him. Then he gave all this to the Levites who were in charge of the work done at the LORD's tent.
Then the officers from the military divisions, the commanders of the companies and battalions of men, came to Moses.
They said to him, "Sir, we have counted all the soldiers under our command, and not one of them is missing.
So we have brought as gifts to the LORD the gold jewelry that each of us found--arm bands, bracelets, signet rings, earrings, and pendants. We offer them to make peace with the LORD."
Moses and the priest Eleazar took all the hand-crafted gold articles from them.
All the gold contributed to the LORD by the commanders weighed about 420 pounds.
Each soldier kept his own loot.
Moses and the priest Eleazar took the gold from the commanders and brought it into the LORD's presence at the tent of meeting as a reminder to the Israelites.