Avenge the children of Israel of the Midianites,.... For the injury they had done them, by sending their daughters among them, who enticed them to commit uncleanness with them, and then drew them into the worship of their idols, which brought the wrath of God upon them, and for which 24,000 persons were slain.
Now, though the Moabites had a concern in this affair as well as the Midianites, yet they were spared; which some think was for the sake of Lot, from whom they descended; but why not the Midianites for the sake of Abraham, whose offspring they were by Keturah?