A Commentary, Critical, Practical, and Explanatory on the Old and New Testaments, by Robert Jamieson, A.R. Fausset and David Brown  at sacred-texts.com
num 31:1THE MIDIANITES SPOILED AND BALAAM SLAIN. (Num. 31:1-54)
the Lord spake unto Moses, Avenge the children of Israel of the Midianites--a semi-nomad people, descended from Abraham and Keturah, occupying a tract of country east and southeast of Moab, which lay on the eastern coast of the Dead Sea. They seem to have been the principal instigators of the infamous scheme of seduction, planned to entrap the Israelites into the double crime of idolatry and licentiousness [Num 25:1-3, Num 25:17-18] by which, it was hoped, the Lord would withdraw from that people the benefit of His protection and favor. Moreover, the Midianites had rendered themselves particularly obnoxious by entering into a hostile league with the Amorites (Jos 13:21). The Moabites were at this time spared in consideration of Lot (Deu 2:9) and because the measure of their iniquities was not yet full. God spoke of avenging "the children of Israel" [Num 31:2]; Moses spoke of avenging the Lord [Num 31:3], as dishonor had been done to God and an injury inflicted on His people. The interests were identical. God and His people have the same cause, the same friends, and the same assailants. This, in fact, was a religious war, undertaken by the express command of God against idolaters, who had seduced the Israelites to practise their abominations.
num 31:3Arm some of yourselves--This order was issued but a short time before the death of Moses. The announcement to him of that approaching event [Num 31:2] seems to have accelerated, rather than retarded, his warlike preparations.
num 31:5there were delivered--that is, drafted, chosen, an equal amount from each tribe, to prevent the outbreak of mutual jealousy or strife. Considering the numerical force of the enemy, this was a small quota to furnish. But the design was to exercise their faith and animate them to the approaching invasion of Canaan.
num 31:6Moses sent . . . Eleazar the priest, to the war--Although it is not expressly mentioned, it is highly probable that Joshua was the general who conducted this war. The presence of the priest, who was always with the army (Deu 20:2), was necessary to preside over the Levites, who accompanied the expedition, and to inflame the courage of the combatants by his sacred services and counsels.
holy instruments--As neither the ark nor the Urim and Thummim were carried to the battlefield till a later period in the history of Israel, the "holy instruments" must mean the "trumpets" (Num 10:9). And this view is agreeable to the text, by simply changing "and" into "even," as the Hebrew particle is frequently rendered.
num 31:7they slew all the males--This was in accordance with a divine order in all such cases (Deu 20:13). But the destruction appears to have been only partial--limited to those who were in the neighborhood of the Hebrew camp and who had been accomplices in the villainous plot of Baal-peor (Num 25:1-3), while a large portion of the Midianites were absent on their pastoral wanderings or had saved themselves by flight. (Compare Jdg 6:1).
num 31:8the kings of Midian--so called, because each was possessed of absolute power within his own city or district; called also dukes or princes of Sihon (Jos 13:21), having been probably subject to that Amorite ruler, as it is not uncommon in the East to find a number of governors or pachas tributary to one great king.
Zur--father of Cozbi (Num 25:15).
Balaam also . . . they slew with the sword--This unprincipled man, on his dismissal from Balak, set out for his home in Mesopotamia (Num 24:25). But, either diverging from his way to tamper with the Midianites, he remained among them without proceeding farther, to incite them against Israel and to watch the effects of his wicked counsel; or, learning in his own country that the Israelites had fallen into the snare which he had laid and which he doubted not would lead to their ruin, he had, under the impulse of insatiable greed, returned to demand his reward from the Midianites. He was an object of merited vengeance. In the immense slaughter of the Midianitish people--in the capture of their women, children, and property and in the destruction of all their places of refuge--the severity of a righteous God fell heavily on that base and corrupt race. But, more than all others, Balaam deserved and got the just reward of his deeds. His conduct had been atrociously sinful, considering the knowledge he possessed, and the revelations he had received, of the will of God. For any one in his circumstances to attempt defeating the prophecies he had himself been the organ of uttering, and plotting to deprive the chosen people of the divine favor and protection, was an act of desperate wickedness, which no language can adequately characterize.
num 31:13Moses, and Eleazar the priest, . . . went forth to meet them without the camp--partly as a token of respect and congratulation on their victory, partly to see how they had executed the Lord's commands, and partly to prevent the defilement of the camp by the entrance of warriors stained with blood.
num 31:14And Moses was wroth with the officers of the host--The displeasure of the great leader, though it appears the ebullition of a fierce and sanguinary temper, arose in reality from a pious and enlightened regard to the best interests of Israel. No order had been given for the slaughter of the women, and in ancient war they were commonly reserved for slaves. By their antecedent conduct, however, the Midianitish women had forfeited all claims to mild or merciful treatment; and the sacred character, the avowed object of the war (Num 31:2-3), made their slaughter necessary without any special order. But why "kill every male among the little ones"? It was designed to be a war of extermination, such as God Himself had ordered against the people of Canaan, whom the Midianites equalled in the enormity of their wickedness.
num 31:19abide without the camp seven days: whosoever hath killed any person . . . purify both yourselves and your captives--Though the Israelites had taken the field in obedience to the command of God, they had become defiled by contact with the dead. A process of purification was to be undergone, as the law required (Lev 15:13; Num 19:9-12), and this purifying ceremony was extended to dress, houses, tents, to everything on which a dead body had lain, which had been touched by the blood-stained hands of the Israelitish warriors, or which had been the property of idolaters. This became a standing ordinance in all time coming (Lev 6:28; Lev 11:33; Lev 15:12).
num 31:25Take the sum of the prey that was taken--that is, of the captives and cattle, which, having been first lumped together according to ancient usage (Exo 15:9; Jdg 5:30), were divided into two equal parts: the one to the people at large, who had sustained a common injury from the Midianites and who were all liable to serve: and the other portion to the combatants, who, having encountered the labors and perils of war, justly received the largest share. From both parts, however, a certain deduction was taken for the sanctuary, as a thank offering to God for preservation and for victory. The soldiers had greatly the advantage in the distribution; for a five-hundredth part only of their half went to the priest, while a fiftieth part of the congregation's half was given to the Levites.
num 31:32the booty, being the rest of the prey which the men of war had caught--Some of the captives having been killed (Num 31:17) and part of the cattle taken for the support of the army, the total amount of the booty remaining was in the following proportions:
Prey Total Amount Half to Soldiers Deducted to God Half to Congregation Deducted to Levites
Sheep 675,000 337,500 675 337,500 6,750
Beeves 72,000 36,000 72 36,000 720
Asses 61,000 30,500 61 30,500 610
Persons 32,000 16,000 32 16,000 320
num 31:48officers . . . said . . . there lacketh not one man of us--A victory so signal, and the glory of which was untarnished by the loss of a single Israelitish soldier, was an astonishing miracle. So clearly betokening the direct interposition of Heaven, it might well awaken the liveliest feelings of grateful acknowledgment to God (Psa 44:2-3). The oblation they brought for the Lord "was partly an atonement" or reparation for their error (Num 31:14-16), for it could not possess any expiatory virtue, and partly a tribute of gratitude for the stupendous service rendered them. It consisted of the "spoil," which, being the acquisition of individual valor, was not divided like the "prey," or livestock, each soldier retaining it in lieu of pay; it was offered by the "captains" alone, whose pious feelings were evinced by the dedication of the spoil which fell to their share. There were jewels to the amount of 16,750 shekels, equal to Â£87,869 16s. 5d. sterling.