Numbers 31 records Moses' last military command. Yahweh said, Avenge the children of Israel on the Midianites. Afterward you shall be gathered to your people. The reason is given in verse 16: the Midianite women had, on the counsel of Balaam, caused Israel to trespass against Yahweh at Peor, bringing the plague. Twelve thousand men went, a thousand from every tribe, with Phinehas the priest carrying the holy vessels and the trumpets. Balaam was among those who died. The chapter describes severe judgment, including on captives. It is one of the hardest passages in Scripture. Teachers may wish to explain it with care and pastoral guidance, remembering that God alone is the righteous Judge.
Moses and Eleazar met the army outside the camp. Anyone who had killed or touched the dead remained outside seven days and was purified on the third and seventh days, as in Numbers 19. Metal objects passed through fire, and everything was washed with the water for impurity. The plunder was divided equally between the twelve thousand soldiers and the congregation. One out of five hundred from the soldiers' half went to Eleazar as Yahweh's tribute, and one out of fifty from the people's half went to the Levites.
The commanders reported, Your servants have taken the sum of the men of war who are under our command, and there lacks not one man of us. In gratitude they brought gold ornaments, armlets, bracelets, signet rings, earrings, and necklaces, to make atonement for their souls. The gold weighed 16,750 shekels. Moses and Eleazar took it into the Tent of Meeting for a memorial for the children of Israel before Yahweh. God's protection of every soldier echoes the Good Shepherd, who said His sheep will never perish (John 10:28).