That is what Moses did to the Midianites.
Can you read the Bible several times more?
Nu 22:7 So the elders of Moʹab and the elders of Midʹi·an traveled with the fee for divination in their hands and went to Baʹlaam and conveyed to him Baʹlak’s message.
Nu 25:1-3 When Israel was dwelling in Shitʹtim, the people started to commit sexual immorality with the daughters of Moʹab.2The women invited the people to the sacrifices of their gods, and the people began to eat and to bow down to their gods.3So Israel joined in worship of the Baʹal of Peʹor, and Jehovah became enraged with Israel.
"Harass the Midʹi·an·ites and strike them down,18because they have been HARASSING YOU....."
31 Jehovah then told Moses: 2 “Take VENGEANCE for the Israelites on the Midʹi·an·ite