Benedict Cumberbatch is currently earning praise (and Oscar buzz) for his uncanny performance as World War II codebreak Alan Turing in The Imitation Game. But the secret to the actor’s onscreen magic could be a simple case of genes, as one family history website is reporting that Cumberbatch and Turing are actually distantly related.

Benedict CumberbatchCumberbatch as Turing in The Imitation Game

According to family history website Ancestry, the pair are actually 17th cousins on their father’s side and their lineage can be traced back to the 14th century.

Genealogists believe that the pair share a relative in the First Earl of Somerset John Beaufort who was born in 1373, which is traceable through their paternal lines.

But Turing isn’t the only interesting name to feature in the Cumberbatch family history. The actor’s third cousin twice removed, Noel Carlisle Rees, was a member of the British Military Intelligence who aided the escape of thousands of allied soldiers out of Greece during the Second World War.

More: Benedict Cumberbatch Reveals Sketching Helps Him Deal With The "Nonsense" Of Fame

He is also said to be the sixth cousin of Canadian astronaut Chris Hadfield.

“It would seem that there is a flair for espionage and bravery that has descended down multiple generations of Benedict Cumberbatch’s family tree,” Miriam Silverman, UK content manager for Ancestry, said.

“It’s amazing to think that when stepping into the role of Alan Turing, he would not only be portraying a world class code breaker but a real life relation.”

This isn't the first time Cumberbatch’s family history has been delved into. Earlier this year, after the release of 12 Years A Slave, in which the actor portrayed a slave owner, several media outlets reported that the Cumberbatch’s fifth great-grandfather Abraham Cumberbatch had been a slave owner.

More: Benedict Cumberbatch And Sophie Hunter's Classy Engagement Announcement

In February New York’ commissioner Stacey Cumberbatch said she believed she got her surname because her ancestors worked as slaves on the Cumberbatch family plantation in Barbados. She told the New York Times she was related to the actor if "not by blood, then by geography and the complicated history of the slave trade.”

Cumberbatch has in the past acknowledged his families ties to slavery, saying in a 2007 interview that his mother had urged him not to use his real surname professionally, in case it made him a target for reparation claims by the descendants of slaves.

Watch the trailer for The Imitation Game: