Oscar-nominated actor Benedict Cumberbatch has joined others in calling for the British government to pardon gay and bisexual men convicted in the past under the defunct "gross indecency" law.

Their letter published Saturday in the Guardian praises the government for the 2013 pardon of the Second World War code breaker Alan Turing, whom Cumberbatch portrays in the movie The Imitation Game.

Turing, who played a vital role in breaking the German wartime code, was praised by Winston Churchill as having made "the single biggest contribution" to the Allied victory in the Second World War.

But Turing, a gay man in an era when homosexuality was illegal, was convicted of gross indecency in 1952 and committed suicide two years later.

These events are at the core of The Imitation Game, which chronicles the role Turing played in cracking the Germans' Enigma code machine. It has been nominated for eight Academy Awards, including best picture and best actor for Cumberbatch's performance.

49,000 men convicted

Turing was pardoned by Queen Elizabeth at the recommendation of the government, but the letter points out that 49,000 other men convicted under the same law also merit pardons.

"The U.K.'s homophobic laws made the lives of generations of gay and bisexual men intolerable," the letter said.

The letter was also signed by Rachel Barnes, Turing's niece; Morten Tyldum, director of The Imitation Game, actor Stephen Fry and longtime rights campaigner Peter Tatchell.

The letter calls on Prince William, his wife Kate and other "young leaders of today" to take steps to pardon all of the men, including an estimated 15,000 thought to still be alive.

A spokesman for the royal couple said they wouldn't make any public comment on the issue because it's a government matter.

Thousands have signed an online petition calling for mass pardons.