By Rabbi Mordechai Willig
Pinchas turned back Hashem's wrath from upon B'nai Yisrael, when he was zealous, displaying Hashem's zeal in their midst, and he was given Hashem's covenant of peace (paraphrase of Bamidbar 25:11-12). Rashi interprets "bekan'o - when he was zealous" as "benokmo - when he avenged", emphasizing Pinchas' action, i.e. killing Zimri and Cozbi (25:8, 14-15), rather than his zeal.
Toras Chaim (Sanhedrin 82a) explains that it was Pinchas' anger which led him to act immediately when he saw the chilul Hashem. Had he waited until the sinful deed ended, his killing of the perpetrators would be an act of murder and a capital offense. Thus it was his zeal which enabled his vengeful act.
Perhaps it was Pinchas' zeal itself which turned back Hashem's anger. In effect, Pinchas' anger substituted for the anger Hashem should have expressed (Rashi 25:11), thereby ending the anger and the plague (25:8).
Since zeal and anger can often be expressed inappropriately and lead to unwarranted divisiveness, Hashem gave Pinchas His covenant of peace.
One who cohabits with a gentile woman, zealots may kill him (ibid 81b). If the sinner is not killed by zealots, his punishment is kares (ibid 82a, based on Malachi 2:11-12). Even for zealots, the license to kill such a sinner is limited to a cases where the sin is committed publicly (b'farhesya) (Avodah Zara 36b).
The Ran (Sanhedrin 82a) suggests that the punishment of kares is also limited to when the sin is committed in public. It is the chilul Hashem, not the sinful act itself, which warrants kares. It was precisely the chilul Hashem which aroused Pinchas' ire.
The gemara (ibid 82a) interjects the story of the burning of Yehoyakim's skull in the middle of the discussions of zealots killing a public sinner. Ostensibly, it is an unrelated story, told by R' Chiya ben Avuya, whose previous statement deals with one who cohabits with a gentile woman. Perhaps there is a deeper connection than merely being stated by the same amora. Yehoyakim violated the laws of the Torah publicly (Yerushalmi Pe'ah 1:1). It is not the severity of the sin for which he is singled out, but the insolence to sin without shame (Rambam Hilchos Teshuva 3:11). In this way, Yehoyakim's public sin and gruesome punishment is related to one who cohabits publicly with a gentile woman, who is punished by kares if not killed by a zealot.
How should one react nowadays to one who sins publicly, pridefully, and without shame? Vengeful acts are unthinkable, forbidden and counterproductive. Egregious sinners were eliminated at a time of open miracles and clear Divine Providence (see the halacha of moridin, Avodah Zara 26b) to prevent others from being swayed by a small minority of sinners. Today, however, such actions would be viewed by the majority as outrageous thuggery. Vigilantism of this sort is counterproductive and prohibited (Chazon Ish Yoreh Deah 2:16).
While we dare not imitate Pinchas' actions, we also dare not ignore his emotional reaction. Equanimity in the face of chilul Hashem betrays a lack of zeal. In our analysis, it was the zeal itself which turned back Hashem's anger and stopped the plague. Our visceral reaction to public, shameless sin, especially in sexual relationships, such as those reacted to by Pinchas, should contain a measure of zealous outrage.
Zeal and anger, in word as in deed, can be expressed inappropriately and lead to unwarranted divisiveness. In striking a balance between zeal and apathy, we must pray to be given Hashem's covenant of peace in the spirit of Pinchas.