The Israelites, under Moses' leadership, are executing God's command to take vengeance on the Midianites. This verse lists the five kings of Midian who were killed, emphasizing the thoroughness of the Israelites' victory. Balaam, the son of Beor, is also mentioned as being killed by the sword. Balaam is a significant figure because he had previously been hired by Balak, the king of Moab, to curse the Israelites. However, God intervened, and Balaam ended up blessing Israel instead. Despite this, Balaam later advised the Midianites on how to lead Israel into sin, resulting in a plague among the Israelites. His death here marks the end of his influence and serves as a stark reminder of the consequences of leading God's people astray.
This passage underscores the theme of divine justice and the fulfillment of God's promises. It also highlights the importance of faithfulness to God and the serious repercussions of sin and rebellion. The narrative illustrates that while God is patient and merciful, there is a time for judgment and the fulfillment of His righteous decrees.