The Gemara in Sotah (43a) and Bava Basra (109b) both report the text which angry Yidden were grumbling against Pinchas after he killed Zimri and the Midianite princess.
וְאֶלְעָזָר בֶּן אַהֲרֹן לָקַח לוֹ מִבְּנוֹת פּוּטִיאֵל לוֹ לְאִשָּׁה מַאי לָאו דְּאָתֵי מִיִּתְרוֹ שֶׁפִּיטֵּם עֲגָלִים לַעֲבוֹדָה זָרָה לָא מִיּוֹסֵף שֶׁפִּיטְפֵּט בְּיִצְרוֹ. וַהֲלֹא שְׁבָטִים מְבַזִּין אוֹתוֹ רְאִיתֶם בֶּן פּוּטִי זֶה בֵּן שֶׁפִּיטֵּם אֲבִי אִמּוֹ עֲגָלִים לַעֲבוֹדָה זָרָה יַהֲרוֹג נָשִׂיא מִיִּשְׂרָאֵל אֶלָּא אִי אֲבוּהּ דְּאִימֵּיהּ מִיּוֹסֵף אִימֵּיהּ דְּאִימֵּיהּ מִיִּתְרוֹ וְאִי אִימֵּיהּ דְּאִימֵּיהּ מִיּוֹסֵף אֲבוּהּ דְּאִימֵּיהּ מִיִּתְרוֹ.
People were outraged: “See this fellow whose grandfather was fattening calves for idol worship. He how has the gall to murder the prince of a Shevet of Klal Yisrael!”
The Gemara explains that the one phrase “bas-Putiel” describing the wife of Elazar who gave birth to Pinchas, incorporates two separate elements of genetic background.
She was the product of an unusual marriage, a fascinating piece of Jewish history in Mitzrayim. At some point before Moshe met Yisro, and before Yisro’s daughter Tzipporah converted to Judaism and married Moshe, an older daughter of his had blazed this trail by converting. She became a Jew long before Yetzias Mitzrayim, and she married a descendant of Yosef.
The two of them had a daughter together, who later married Elazar, the son of Aharon. This daughter’s son from Elazar was named Pinchas. Thus, this very same Pinchas who killed Zimri and the Midianite princess, was the child of a ger, and thus was descended from both Yosef HaTzaddik and Yisro, the Midianite priest. Later, when Yisro converted, all of this looked less controversial.
Yet the people had a long memory, and recalled the strange marriage of the priest’s daughter who married into Yosef’s family, and the daughter of that bit of matchmaking who then married into Aharon’s family, bearing a child named Pinchas.
This fellow with the checkered back story had the effrontery to kill the prince of Shimon, because in his opinion the prince was behaving inappropriately!
Despite the evidence that the plague killing 24,000 people seemed to stop just as Pinchas had slain the prince, the common folk could not make that connection.
All they could see in that moment was the grandchild of a ger deciding he had the right to personally inflict a death penalty on a prince, in the form of a lynching unauthorized by any court.
Remember also that when Aharon, Elazar and Isamar had been given the role of Kohanim over the last forty or so years in the Midbar, Pinchas had not. This probably contributed to the public perception that his lineage had been tainted by having Yisro for a grandfather. This killing was unforgivable: the gall of this man!
Think about it. This was a moment of national crisis, in the immediate aftermath of a deadly plague. The man who was the hero of the moment was not recognized as such by the people. They saw him as an interloper and expected him to be punished by Moshe.
How did Hashem resolve this? The Gemara explains in Sanhedrin (82b), from hints in the language of our Parsha:
הִתְחִילוּ שְׁבָטִים מְבַזִּין אוֹתוֹ רְאִיתֶם בֶּן פּוּטִי זֶה שֶׁפִּיטֵּם אֲבִי אִמּוֹ עֲגָלִים לַעֲבוֹדָה זָרָה וְהָרַג נְשִׂיא שֵׁבֶט מִיִּשְׂרָאֵל בָּא הַכָּתוּב וְיִחֲסוֹ פִּנְחָס בֶּן אֶלְעָזָר בֶּן אַהֲרֹן הַכֹּהֵן. אָמַר לוֹ הַקָּדוֹשׁ בָּרוּךְ הוּא לְמֹשֶׁה הַקְדֵּם לוֹ שָׁלוֹם שֶׁנֶּאֱמַר {במדבר כ״ה:י״ב} לָכֵן אֱמוֹר הִנְנִי נוֹתֵן לוֹ אֶת בְּרִיתִי שָׁלוֹם וּרְאוּיָה כַּפָּרָה זוֹ שֶׁתְּהֵא מְכַפֶּרֶת וְהוֹלֶכֶת לְעוֹלָם.
Hashem said that Moshe should approach Pinchas in public and greet him with a “Sholom Aleichem” before Pinchas could say a word.
This is perhaps the most theatrical scene in the entire Torah, outdoing Nimrod’s furnace, Avraham fighting powerful kings with a militia of 318 men, Moshe stalking out of Paraoh’s palace, the ground swallowing up Korach’s people.
Everyone thinks Pinchas is in the wrong, that he is an outcast and that he has just been guilty of assassinating a top Jewish leader, not to mention causing an international incident with the royal family of Midian.
Then Moshe walks up and greets him: “Shalom Aleichem!” Pinchas is to be honored, not censured.
He is the good guy, the hero, uncowed by popular opinion, loyal to Hashem and to Klal Yisrael. He has not lost sight of how a righteous Jewish leader behaves, and cavorting with misbehaving princesses is not the way.
He is the one who stopped the plague with his spiritual heroism. Aharon can be just as proud of him as he is of Aharon. Pinchas and all his generations will henceforth serve as full Kohanim.
Don’t follow the crowd, follow the man of integrity.
Rav Homnick Shlita