"The Lord spoke to Moses, saying, 2 “Avenge the people of Israel on the Midianites. Afterward you shall be gathered to your people.” 3 So Moses spoke to the people, saying, “Arm men from among you for the war, that they may go against Midian to execute the Lord's vengeance on Midian. 4 You shall send a thousand from each of the tribes of Israel to the war.” 5 So there were provided, out of the thousands of Israel, a thousand from each tribe, twelve thousand armed for war. 6 And Moses sent them to the war, a thousand from each tribe, together with Phinehas the son of Eleazar the priest, with the vessels of the sanctuary and the trumpets for the alarm in his hand. 7 They warred against Midian, as the Lord commanded Moses, and killed every male. 8 They killed the kings of Midian with the rest of their slain, Evi, Rekem, Zur, Hur, and Reba, the five kings of Midian. And they also killed Balaam the son of Beor with the sword. 9 And the people of Israel took captive the women of Midian and their little ones, and they took as plunder all their cattle, their flocks, and all their goods. 10 All their cities in the places where they lived, and all their encampments, they burned with fire, 11 and took all the spoil and all the plunder, both of man and of beast. 12 Then they brought the captives and the plunder and the spoil to Moses, and to Eleazar the priest, and to the congregation of the people of Israel, at the camp on the plains of Moab by the Jordan at Jericho."
Numbers 31:1-12
First of all, a general word about the grim and sometimes gruesome accounts we find in the earlier books of the Old Testament about the slaughters perpetrated by the Israelites on the nations of Canaan. What we must understand clearly and this includes the incident about Midian is that, as already suggested, these wars were holy wars and they were commanded by God. The only way to make sense of these bloody carnages, and to see any moral ground for Israel displacing the nations of Canaan from Canaan is to realise that God was using Israel as the rod of His anger against them, judging them for their sins and depravities. This is stated explicitly and more than once in the Old Testament itself (cf Genesis 15:16; Leviticus 18:2430). The iniquity of the Canaanite nations was full, and the time of their destruction was ripe. This is why they were thus dealt with, and it was no arbitrary act of injustice that drove them out of their land. They had forfeited the right to live as nations, by the extremes of their debauchery, just as Sodom and Gomorrah had done, and just as the Cainite civilisation as a whole had done, bringing upon itself the judgment of the Flood. And it should be remembered that God dealt with His own people in similar fashion, when He brought them into the captivity of Babylon in 586 BC for seventy years. To understand His burning passion for righteousness in His creatures is to understand the basic reason for these judgments upon men and nations that refused to be righteous, and who rendered themselves incapable of being so, by their continued sin. That is the first consideration. There are others, to which we turn now.