The Torah lavishes praise on Pinehas who took the law into his own hand: And the LORD spoke to Moses, saying, “Phinehas turned away My wrath from the Israelites when he zealously acted for My zeal in their midst. The Talmud Yerushalmi balances this spectacular endorsement of vigilante behavior by seeing it as a response to something else. Rabbi Yehuda ben Pazi said: they sought to excommunicate Pinehas but the Divine Spirit jumped in and stopped them. Precisely because vigilante behavior is not acceptable, in this instance the Torah endorses Phinehas, because usually such actions are not OK.