LONDON — Nearly 60 years after his death, Alan Turing, the British scientist whose code-breaking work helped the Allies beat Hitler and whom many consider the father of artificial intelligence, received a royal pardon Tuesday for the crime of having had sex with another man.
Turing was convicted in 1952 of "gross indecency," the charge used against gay men in an age when homosexual relations were illegal in Britain. He underwent chemical castration and had his government security clearance confiscated, then took his own life in 1954 at age 41, prematurely ending a distinguished career that pioneered today's computer era.
In recent years, a campaign to have Turing's name cleared has built momentum, resulting in an official apology in 2009 and culminating in the announcement Tuesday that Queen Elizabeth II, exercising her royal "prerogative of mercy," had pardoned Turing at the request of the government.
The decision was hailed by many as long-overdue redress for one of Britain's most brilliant scientists. But there was also criticism over the legal anomaly it created and the fact that tens of thousands of other men not fortunate enough to be as famous as Turing remain on the books as criminals for being gay.
"Dr. Turing deserves to be remembered and recognized for his fantastic contribution to the war effort and his legacy to science," Justice Secretary Chris Grayling said. "A pardon from the queen is a fitting tribute to an exceptional man."
Prime Minister David Cameron lauded Turing's vital work in cracking the Nazis' ingenious "Enigma" code, which had stumped some of the Allies' best cryptographers. Deciphering the German military's secret communications shortened World War II and "saved countless lives," Cameron said.
Turing is also remembered for his path-breaking thinking on artificial intelligence and the idea that a machine could be programmed to perform multiple tasks. Long before the creation of modern computers, he developed the "Turing test," an influential framework for determining whether a machine could be described as intelligent.
But his conviction for gross indecency shut down his career and subjected him to disgrace and appalling treatment. Forced to take female hormones to sap his sex drive, Turing was stripped of his clearance for government intelligence work and became bitter and depressed.
His death two years later from cyanide poisoning was ruled a suicide, though some of his friends and colleagues insisted it was an accident, and a few others muttered darkly of a plot by secret agents to kill him.
Turing's story has been much-written about and dramatized for stage and screen. The play "Breaking the Code" won critical acclaim in the West End and on Broadway in the 1980s; a new musical based on Turing's life and work, "The Universal Machine," premiered in London this year. Shooting has begun on a film about Turing, "The Imitation Game," starring Benedict Cumberbatch and Keira Knightley.
His posthumous pardon is highly unusual and possibly unique. Royal pardons are normally reserved for people who are innocent of the offenses they are accused of committing, and are usually requested by family members or others close to the alleged offender. Neither is true in this case, a departure from protocol that reflects "the exceptional nature of Alan Turing's achievements," the government said.
But that sits uneasily with some legal scholars. While it's fine to denounce past statutes, such as the one against homosexuality, as retrograde and unjust, critics say, Turing was convicted according to the law of the land at the time, and pardoning him alone could be seen as implying that some people are above the law by virtue of their fame, their accomplishments or their value to the state.
Peter Tatchell, Britain's most prominent gay-rights advocate, said that at least 50,000 men were convicted of gross indecency, and that as many as 15,000 of them are still alive, stuck with criminal records for being gay.
"They have never been offered a pardon and will never get one. Selective redress is a bad way to remedy a historic injustice," Tatchell said. "An apology and pardon is due to the other 50,000-plus men who were also convicted of consenting, victimless homosexual relationships during the 20th century."