"Pinchas the son of Elazar the son of Aharon the Kohen removed My wrath from the Children of Israel..." (Bamidbar 25:11). Rashi, quoting the Talmud (Sanhedrin 82b), explains that the Torah delineated Pinchas' lineage at this juncture to counter the harangue of some people who posited that Pinchas was unjustified in slaying Zimri, as Pinchas was from a stock of idolaters (his mother was from Yisro's family) and Zimri was a prince of the tribe of Shimon. In light of the baseness of Pinchas' ancestry, there were Jews who held that he exhibited "chutzpa" to rise up in zealousness against the royal Zimri. The Torah therefore related that Pinchas was of priestly ancestry, tracing him directly to Aharon the Kohen Gadol.

What does the above explanation mean? Despite Pinchas' relationship to Aharon, he was still also descended from Midianites. Thus, how does the Torah's emphasis that Pinchas was from the family of Kohanim dispel the notion that a young descendent of a formerly idolatrous clan (Yisro's household) dared to strike a prince of Shimon? Furthermore, Pinchas' priestly lineage was already known to the public; his relationship to Aharon and Elazar was not a secret. What was gained by the Torah noting this already-established ancestry?

If we explore the parsha further, we again see lineage brought up for discussion. The daughters of Tzelofchod claimed that they were entitled to their father's portion in the Land due to their relationship, and Rashi notes (27:8, from Gemara Sanhedrin 8a) that the daughters of Tzelofchod (out of their love of Eretz Yisroel and their quest for halachic guidance) merited having intuited that they had an halachic right to the land they requested. Rashi also explains (27:16, from Tanchuma 11) that prior to Yehoshua being appointed as the next leader, Moshe Rabbeinu sought for his own sons to succeed him in this post, but that Hashem rejected the idea, as Yehoshua merited this position instead due to his attachment and devotion to Moshe, his rebbe.

What comes out of these cases is that lineage is ignored in favor of personal merit and spiritual accomplishments. The position of the anti-Pinchas faction was that "yichus" - lineage - was a legitimate qualifying factor for taking a stand in a Torah matter. They argued, "How can one from flawed stock challenge one from royal ancestry?" Pinchas' opponents were told that they were totally incorrect, for yichus is not a factor; Pinchas could be viewed as the regal grandson of Aharon the Kohen just as easily as he could be viewed as a descendant of lowly Midianites. (This is the real point of the Torah's emphasis of Pinchas' lineage.) The Torah instructed the people to look at Pinchas' deeds, not his background, for one's deeds are what count when it comes to spiritual endeavors and standing up for Torah principles.

So, too, the daughters of Tzelofchod were given high praise by Chazal, for their love for Eretz Yisroel and sincere pursuit of halachic guidance were what counted in the eyes of our sages. The fact that Tzelofchod committed a major public sin and was executed on account of it did not detract from the merit or standing of his daughters.

Yehoshua succeeded Moshe Rabbeinu not because of ancestry or family connections; it was Yehoshua's status as Moshe's prime talmid - a status that was acquired through years of study at Moshe's feet - that made him worthy to succeed his rebbe and become the leader of the generation.

Some aspects of yichus are of import in certain areas, but attainment of spiritual greatness is open to the masses. The halacha is that a Torah scholar who is the product of an illegitimate parental union is to be accorded greater honor that a Kohen who is not a talmid chochom. Let us keep this in mind as an example of what our priorities should be when it comes to choosing our leaders and heeding advice.