וְאֶת מַלְכֵי מִדְיָן הָרְגוּ עַל חַלְלֵיהֶם אֶת אֱוִי וְאֶת רֶקֶם וְאֶת צוּר וְאֶת חוּר וְאֶת רֶבַע חֲמֵשֶׁת מַלְכֵי מִדְיָן וְאֵת בִּלְעָם בֶּן בְּעוֹר הָרְגוּ בֶּחָרֶב
And they killed the Midianite kings upon their corpses (in addition to the others who were killed), Evi, Rekem, Tzur, Chur, and Reva, the five kings of Midian; and Bil’am the son of Be’or they killed with a sword.
Many Midianites were killed by the Jews in the battle following their attempt to curse the Jews and causing them to sin. The Torah specifically lists the five kings of Midian and Bil’am, but only by Bil’am does the Torah specify how he was killed.
Rashi explains that because he tried twisting the Jews power, the power of prayer (words of the mouth) against them, they twisted the power of Esav, the sword, against him. (Although they all may very well have been killed by actual swords, it was the power of prayer which enabled it. For Bil’am though, the main cause was the sword, not the prayer behind it.)
The Chafetz Chaim writes that we can take a tremendous lesson from here. Just like a soldier must make sure to always have his sword battle-ready, shined, sharpened and pointed, we must keep our weapon battle-ready. We must keep our lips pure from speaking anything that can dull the power of our prayer.