The Lord spoke to Moses and said,
"Pay back the Midianites for what they did to the Israelites; after that you will die."
So Moses said to the people, "Get some men ready for war. The Lord will use them to pay back the Midianites.
Send to war a thousand men from each of the tribes of Israel."
So twelve thousand men got ready for war, a thousand men from each tribe.
Moses sent those men to war; Phinehas son of Eleazar the priest was with them. He took with him the holy things and the trumpets for giving the alarm.
They fought the Midianites as the Lord had commanded Moses, and they killed every Midianite man.
Among those they killed were Evi, Rekem, Zur, Hur, and Reba, who were the five kings of Midian. They also killed Balaam son of Beor with a sword.
The Israelites captured the Midianite women and children, and they took all their flocks, herds, and goods.
They burned all the Midianite towns where they had settled and all their camps,
but they took all the people and animals and goods.
Then they brought the captives, the animals, and the goods back to Moses and Eleazar the priest and all the Israelites. Their camp was on the plains of Moab near the Jordan River, across from Jericho.
Moses, Eleazar the priest, and all the leaders of the people went outside the camp to meet them.
Moses was angry with the army officers, the commanders over a thousand men, and those over a hundred men, who returned from war.
He asked them, "Why did you let the women live?
They were the ones who followed Balaam's advice and turned the Israelites from the Lord at Peor. Then a terrible sickness struck the Lord's people.
Kill all the Midianite boys, and kill all the Midianite women who have had sexual relations.
But save for yourselves the girls who have not had sexual relations with a man.
"All you men who killed anyone or touched a dead body must stay outside the camp for seven days. On the third and seventh days you and your captives must make yourselves clean.
You must clean all your clothes and anything made of leather, goat hair, or wood."
Then Eleazar the priest said to the soldiers who had gone to war, "These are the teachings that the Lord gave to Moses:
Put any gold, silver, bronze, iron, tin, or lead --
anything that will not burn -- into the fire, and then it will be clean. But also purify those things with the cleansing water. Then they will be clean. If something cannot stand the fire, wash it with the water.
On the seventh day wash your clothes, and you will be clean. After that you may come into the camp."
The Lord said to Moses,
"You, Eleazar the priest, and the leaders of the family groups should take a count of the goods, the men, and the animals that were taken.
Then divide those possessions between the soldiers who went to war and the rest of the people.
From the soldiers who went to war, take a tax for the Lord of one item out of every five hundred. This includes people, cattle, donkeys, or sheep.
Take it from the soldiers' half, and give it to Eleazar the priest as the Lord's share.
And from the people's half, take one item out of every fifty. This includes people, cattle, donkeys, sheep, or other animals. Give that to the Levites, who take care of the Lord's Holy Tent."
So Moses and Eleazar did as the Lord commanded Moses.
There remained from what the soldiers had taken 675,000 sheep, 3372,000 cattle, 3461,000 donkeys,
and 32,000 women who had not had sexual relations with a man.
The soldiers who went to war got 337,000 sheep,
and they gave 675 of them to the Lord.
They got 36,000 cattle, and they gave 72 of them to the Lord.
They got 30,500 donkeys, and they gave 61 of them to the Lord.
They got 16,000 people, and they gave 32 of them to the Lord.
Moses gave the Lord's share to Eleazar the priest, as the Lord had commanded him.
Moses separated the people's half from the soldiers' half.
The people got 337,500 sheep, 4436,000 cattle, 4530,500 donkeys,
and 16,000 people.
From the people's half Moses took one item out of every fifty for the Lord. This included the animals and the people. Then he gave them to the Levites, who took care of the Lord's Holy Tent. This was what the Lord had commanded Moses.
Then the officers of the army, the commanders of a thousand men and commanders of a hundred men, came to Moses.
They told Moses, "We, your servants, have counted our soldiers under our command, and not one of them is missing.
So we have brought the Lord a gift of the gold things that each of us found: arm bands, bracelets, signet rings, earrings, and necklaces. These are to remove our sins so we will belong to the Lord."
So Moses and Eleazar the priest took the gold from them, which had been made into all kinds of objects.
The commanders of a thousand men and the commanders of a hundred men gave the Lord the gold, and all of it together weighed about 420 pounds;
each soldier had taken something for himself.
Moses and Eleazar the priest took the gold from the commanders of a thousand men and the commanders of a hundred men. Then they put it in the Meeting Tent as a memorial before the Lord for the people of Israel.