Then the LORD said to Moses,
"Take vengeance on the Midianites for leading the Israelites into idolatry. After that, you will die and join your ancestors."
So Moses said to the people, "Choose some men to fight the LORD's war of vengeance against Midian.
From each tribe of Israel, send one thousand men into battle."
So they chose one thousand men from each tribe of Israel, a total of twelve thousand men armed for battle.
Then Moses sent them out, a thousand men from each tribe, and Phinehas son of Eleazar the priest led them into battle. They carried along the holy objects of the sanctuary and the trumpets for sounding the charge.
They attacked Midian just 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 people went to meet them outside the camp.
But Moses was furious with all the military commanders who had returned from the battle.
References for Numbers 31:14
"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.
Now kill all the boys and all the women who have slept with a man.
Only the young girls who are virgins may live; you may keep them for yourselves.
And all of you who have killed anyone or touched a dead body must stay outside the camp for seven days. You must purify yourselves and your captives on the third and seventh days.
Also, purify all your clothing and everything made of leather, goat hair, or wood."
Then Eleazar the priest said to the men who were in the battle, "The LORD has given Moses this requirement of the law:
Anything made of gold, silver, bronze, iron, tin, or lead --
that is, metals that do not burn -- must be passed through fire in order to be made ceremonially pure. These metal objects must then be further purified with the water of purification. But everything that burns must be purified by the water alone.
On the seventh day you must wash your clothes and be purified. Then you may return to the camp."
And the LORD said to Moses,
"You and Eleazar the priest and the family leaders of each tribe are to make a list of all the plunder taken in the battle, including the people and animals.
Then divide the plunder into two parts, and give half to the men who fought the battle and half to the rest of the people.
But first give the LORD his share of the captives, cattle, donkeys, sheep, and goats that belong to the army. Set apart one out of every five hundred as the LORD's share.
Give this share of their half to Eleazar the priest as an offering to the LORD.
Also take one of every fifty of the captives, cattle, donkeys, sheep, and goats in the half that belongs to the people of Israel. Give this share to the Levites in charge of maintaining the LORD's Tabernacle."
So Moses and Eleazar the priest did as the LORD commanded Moses.
The plunder remaining from the spoils that the fighting men had taken totaled 675,000 sheep,
and 32,000 young girls.
So the half of the plunder given to the fighting men totaled 337,500 sheep,
of which 675 were the LORD's share;
36,000 cattle, of which 72 were the LORD's share;
30,500 donkeys, of which 61 were the LORD's share;
16,000 young girls, of whom 32 were the LORD's share.
Moses gave all the LORD's share to Eleazar the priest, just as the LORD had directed him.
The half of the plunder belonging to the people of Israel, which Moses had separated from the half belonging to the fighting men,
amounted to 337,500 sheep,
and 16,000 young girls.
From the half-share given to the people, Moses took one of every fifty prisoners and animals and gave them to the Levites who maintained the LORD's Tabernacle. All this was done just as the LORD had commanded Moses.
Then all the military commanders came to Moses
and said, "Sir, we have accounted for all the men who went out to battle under our command; not one of us is missing!
So we are presenting the items of gold we captured as an offering to the LORD from our share of the plunder -- armbands, bracelets, rings, earrings, and necklaces. This will make atonement for our lives before the LORD."
So Moses and Eleazar the priest received the gold from all the military commanders, all kinds of jewelry and crafted objects.
In all, the gold that the commanders presented as a gift to the LORD weighed about 420 pounds.
References for Numbers 31:52
All the fighting men had taken some of the plunder for themselves.
So Moses and Eleazar the priest accepted the gifts from the military commanders and brought the gold to the Tabernacle as a reminder to the LORD that the people of Israel belong to him.
References for Numbers 31:54