Actor Benedict Cumberbatch is distantly related to Alan Turing, his character in newly released film The Imitation Game, genealogists claim.

Turing was a mathematician and code breaker who helped alter the course of World War II by breaking the Enigma code and creating a machine that allowed Britain and the U.S. to read secret German messages.

Researchers from the family-history website Ancestry have now said that Cumberbatch, 38, is actually Turing’s 17th cousin, sharing a common ancestor back in 14th century England. Tracing the paternal lines of both men revealed that the pair are related to John Beaufort, the first Earl of Somerset, who was born around 1373.

Miriam Silverman, U.K. content manager for Ancestry, said: “It’s amazing to think that 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.”

[Daily Telegraph]

Write to Naina Bajekal at naina.bajekal@time.com.