Zachary Quinto stunned to discover 'Star Trek' connection to his great-grandfather

On Sunday's season finale of Who Do You Think You Are?, Zachary Quinto was stunned to discover a Trekkie connection he has to his maternal great-grandfather, P.J. McArdle.

Quinto decided to boldly go where no Quinto has gone before, as journeyed to discover his ancestral history. And while he knew his great-grandfather McArdle held some sort of political position, due to the fact that the P.J. McArdle Roadway in Pittsburgh, Pa., is named after him, Quinto didn't know too much beyond that.

During the episode, Quinto learned that McArdle was a corresponding member of the Official Organ of the Amalgamated Association of Iron, Steel and Tin Workers, who wrote letters in the journal once a month. In one of those letters, McArdle finished his message by writing, "May it live long and prosper."

Quinto first gained recognition for his role as Sylar in the science-fiction drama series Heroes, but he is best known for his role as Spock in the revival Star Trek films produced by J.J. Abrams. And as many Trekkies know, "Live long and prosper" is the iconic Spock phrase, as it is the greeting of the Vulcan people. So you could imagine how surprised Quinto was to read that iconic phrase written by his great-grandfather over a century prior.

"Whoa, what?" exclaimed Quinto. "That's crazy! That's insane!" However, it wasn't highly illogical that that phrase would have been used in the year 1899, as Historian Edward S. Slavishak explained, "That line was a famous line from a stage play of Rip Van Winkle. So P.J. likely either saw the stage play or, even more likely, it was something he heard from his fellow workers. This was as close as you get as a catchphrase."

Quinto was shocked as he shared, "Wow, that is mind-blowing to me. But the fact that, I mean, 112 years before I would get the role of Spock, my great-grandfather put that phrase in a letter. What are the chances of that? Amazing. Wow, okay."

Who Do You Think You Are? airs Sundays at 7 p.m. on NBC.

Watch 'West Wing' star Bradley Whitford discovering his ancestors served under Ulysses S. Grant in the Civil War:

Read more from Yahoo Entertainment:

Tell us what you think! Hit us up on Twitter, Facebook or Instagram. And check out our host, Kylie Mar, on Twitter, Facebook or Instagram.