“Assail the Midianites and smite them” (Numbers 25:17). “For they assailed you, with their deceits that they deceived you in the matter of Peor, and in the matter of Kozbi daughter of the prince of Midian, their sister, who was slain on the day of the plague in the matter of Peor” (Numbers 25:18). “Assail the Midianites” – Why? “For they assailed you” – from here the Sages said: One who comes to kill you, kill him first.
Rabbi Shimon says; From where is it derived that one who causes a person to sin is worse than one who kills him? It is because one who kills, kills in this world, but he has a share in the World to Come, but one who causes him to sin kills him in this world and in the World to Come. Two nations greeted Israel with the sword, and two with a transgression. The Egyptians and the Edomites greeted them with the sword – “The enemy said: I will pursue, I will overtake…I will draw my sword” (Exodus 15:9); “Edom said to him: You will not pass through me, lest I come out toward you with the sword” (Numbers 20:18).
And two did so with transgression, the Amonites and the Moavites.7Sifrei Bemidbar 131 states that Amonite women were also involved in the harlotry at Shitim. Regarding those who greeted them with the sword, it is written: “You shall not despise an Edomite…you shall not despise an Egyptian” (Deuteronomy 23:8). However, regarding those who greeted them with transgression to cause Israel to sin: “An Amonite or a Moavite shall not enter…even the tenth generation…forever” (Deuteronomy 23:4).