And Moses spake unto the people, saying, Arm some of yourselves unto the war, and let them go against the Midianites, and avenge the LORD of Midian.
Avenge ye the Lord — For the affront which they offered to God, by their own idolatry and lewdness, and by seducing God's people into rebellion against him. God's great care was to avenge the Israelites, Numbers 31:2, and Moses's chief desire was to avenge God rather than himself or the people.
 So there were delivered out of the thousands of Israel, a thousand of every tribe, twelve thousand armed for war.
Twelve thousand — God would send no more, though it is apparent the Midianites were numerous and strong, because he would exercise their trust in him, and give them an earnest of their Canaanitish conquests.
 And Moses sent them to the war, a thousand of every tribe, them and Phinehas the son of Eleazar the priest, to the war, with the holy instruments, and the trumpets to blow in his hand.
Them and Phinehas — Who had the charge not of the army, as general, (an office never committed to a priest in all the Old Testament) but of the holy instruments, and was sent to encourage, and quicken, them in their enterprize.
The holy instruments — The holy breast-plate, wherein was the Urim and Thummim, which was easily carried, and very useful in war upon many emergent occasions.
 And they warred against the Midianites, as the LORD commanded Moses; and they slew all the males.
All the males — Namely all who lived in those parts, for colonies of them, were sent forth to remoter places, which therefore had no hand either in their former sin, or in this present ruling. And herein they did according to God's own order concerning such people, Deuteronomy 20:13, only their fault was, that they did not consider the special reason which they had to involve the women in the destruction.
 And Moses, and Eleazar the priest, and all the princes of the congregation, went forth to meet them without the camp.
Without the camp — Partly to put respect upon them, and congratulate with them for their happy success; and partly to prevent the pollution of the camp by the untimely entrance of the warriors into it.
 Now therefore kill every male among the little ones, and kill every woman that hath known man by lying with him.
The little ones — Which they were forbidden to do to other people, Deuteronomy 20:14, except the Canaanites, to whom this people had equaled themselves by their horrid crimes, and therefore it is not strange, nor unjust, that God, the supreme Lord of all mens lives, who as he gives them, so may take them away when he pleaseth, did equal them in the punishment.
Every woman — Partly for punishment, because the guilt was general, and though some of them only did prostitute themselves to the Israelites, yet the rest made themselves accessary by their consent or approbation; and partly, for prevention of the like mischief from such an adulterous generation.
 And purify all your raiment, and all that is made of skins, and all work of goats' hair, and all things made of wood.
Your raiment — Namely, your spoil and prey.
All work — All which had contracted some ceremonial uncleanness either from the dead bodies which wore them, or the tents or houses where they were, in which such dead bodies lay, or from the touch of the Israelitish soldiers, who were legally defiled by the slaughters they made.
 And divide the prey into two parts; between them that took the war upon them, who went out to battle, and between all the congregation:
Two parts — The congregation hath some share, because the warriors went in the name of all, and because all having been injured by the Midianites, all were to have some share in the reparations: but the warriors who were but 12000, have a far greater share than their brethren, because they underwent greater pains and dangers.
 Take it of their half, and give it unto Eleazar the priest, for an heave offering of the LORD.
An heave-offering — In thankfulness to God for their preservation and good success.
 And of the children of Israel's half, thou shalt take one portion of fifty, of the persons, of the beeves, of the asses, and of the flocks, of all manner of beasts, and give them unto the Levites, which keep the charge of the tabernacle of the LORD.
One of fifty — Whereas the former part was one of five hundred; the reason of the difference is, partly, because this was taken out of the peoples portion, whose hazards being less than the others, their gains also in all reason were to be less: partly because this was to be distributed into more hands, the Levites being now numerous, whereas the priests were but few.
 We have therefore brought an oblation for the LORD, what every man hath gotten, of jewels of gold, chains, and bracelets, rings, earrings, and tablets, to make an atonement for our souls before the LORD.
An atonement — For their error noted, Numbers 31:14,15,16, and withal for a memorial, or by way of gratitude for such a stupendous assistance and deliverance. We should never take any thing to ourselves in war or trade, of which we cannot in faith consecrate a part to God, who hates robbery for burnt-offerings. But when God has remarkably preserved and succeeded us, he expects we should make some particular return of gratitude to him.