Zachary Quinto discovered an extraordinary link between his great-grandfather and Star Trek's Spock in NBC's Who Do You Think You Are? Quinto is one of the celebrities who researched their ancestry in Who Do You Think You Are?, which is currently in its 4th season. The episode of Who Do You Think You Are? featuring Zachary Quinto airs Sunday, 8/14, at 7pm ET on NBC and streams on Peacock.

Quinto was cast as Spock in J.J. Abrams' Star Trek film in 2009, and he went on to play the Vulcan twice more in 2012's Star Trek Into Darkness and 2016's Star Trek Beyond. Quinto won rave reviews for portraying the younger version of Spock, who was also markedly different because Abrams' trilogy is set in an alternate Star Trek timeline. Along with Chris Pine's Captain Kirk and the rest of the cast, Star Trek proved that the iconic characters could be successfully recast. Making Quinto's achievement even more impressive is that he played Spock opposite the original Vulcan, Leonard Nimoy, who mentored his successor in the role before he passed away in 2015.

Related: Why Star Trek 4 Is Better Than Another Movie Reboot

Who Do You Think You Are?'s research into Zachary Quinto's family history uncovered his great-grandfather, P.J. McArdle, who was a union leader in Pittsburgh, PA. Check out a clip from the episode below:

In 1899, McArdle wrote a letter to the editor of The Amalgamated Journal where he used a phrase that is startlingly identical to Spock's most famous quote: "May it live long and prosper." Of course, "Live long and prosper," was made famous by Spock and Star Trek, as it's the preferred farewell said by the Vulcans. It's an amazing coincidence that Zachary Quinto's great-grandfather would use a phrase (in print, no less) that is synonymous with the iconic character Quinto would later portray in blockbuster films.

Zachary Quinto Spock Great Grandfather Quote

Naturally, Quinto was absolutely stunned and delighted by the revelation, calling it "insane." The actor elaborated on his reaction in Who Do You Think You Are?:

The fact that a hundred and fifteen years later, or something, I would get cast a character who is known for that very phrase... There was something about it that felt bigger than me... There was something about it that felt kind of cosmic.

Of course, it would be another 67 years after P.J. McArdle penned that letter to The Amalgamated Journal that Gene Roddenberry would create Star Trek and the character of Mr. Spock. Who Do You Think You Are?'s researcher provided the context to Quinto that the line "live long and prosper" was dialogue from Rip Van Winkle, which was a famous play in McArdle's time. It's worth speculating that McArdle may have seen the play or heard the phrase "live long and prosper" said by his peers in his era. Still, it is a truly extraordinary coincidence, and it's logical Quinto would feel that it's some kind of kismet that he was cast as Spock over a century after his ancestor used the quote "Live long and prosper."

Today, Zachary Quinto shares the role of Spock with Ethan Peck, who plays a different but equally popular version of the Vulcan in Star Trek: Strange New Worlds. For his part, Quinto and the rest of his cast mates are waiting to begin filming the next Star Trek movie. But when Quinto does don Spock's famous pointy ears again, he'll do so knowing of his cosmic bond to his great-grandfather, who said "Live long and prosper" decades before the actor was even born.

Who Do You Think You Are? airs Sundays @ 7pm ET on NBC and streams on Peacock.