31:7 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, Deu 20:13, only their fault was, that they did not consider the special reason which they had to involve the women in the destruction.
31:7-12 The Israelites slew the Kings of Midian. They slew Balaam. God's overruling providence brought him thither, and their just vengeance found him. Had he himself rightly believed what he had said of the happy state of Israel, he would not have thus herded with the enemies of Israel. The Midianites' wicked wiles were Balaam's projects: it was just that he should perish with them, Ho 4:5. They took the women and children captives. They burnt their cities and castles, and returned to the camp.