Alan Turing, considered to be one of the fathers of computer science whose code-breaking work helped the Allies win the Second World War, has been given a royal pardon for his homosexuality conviction, 61 years later.

Turing, a mathematician whose "Turing Machine" is the theoretical backbone of how even today's computers work, led the British effort to decipher the Germans' Enigma code, once considered to be unbreakable, during World War Two. Afterwards, he returned to his work in the nascent field of computer science and programming, working for the National Psychical Laboratory and Manchester University. He also continued to work with the Government Communications Headquarters.

That all changed in 1952, when Turing was convicted of "gross indecency." Faced with jail or probation with a year of mandatory estrogen injections that would reduce his sex drive -- chemical castration, basically -- Turing took the latter. His conviction also ended his work with the GCHQ and his security clearance was revoked.

Turing committed suicide in 1954, a few days before his 42nd birthday. Homosexuality was decriminalized in the United Kingdom in 1967.

Turing's "later life was overshadowed by his conviction for homosexual activity, a sentence we would now consider unjust and discriminatory and which has now been repealed," said Justice Secretary Chris Grayling. "Dr Turing deserves to be remembered and recognized for his fantastic contribution to the war effort and his legacy to science. A pardon from the Queen is a fitting tribute to an exceptional man."

A more fitting tribute would be to have never destroyed a brilliant scientist and war hero's life in the first place, but obviously that's not possible. It does seem a slightly less hollow gesture than that German town that recently revoked Hitler's honorary citizenship 80 years after it was bestowed. 

Turing's royal pardon is only the fourth issued since the end of WWII, and was initially rejected because Turing was "guilty" of what was, at the time, a crime. (The other three pardons are for men who were believed to be innocent of the crimes for which they were convicted.)

Gay rights activist Peter Tatchell pointed out that though Turing has now been pardoned, over 50,000 other men were also punished for being gay before the law was repealed, and they have not been pardoned.

In 2009, then-Prime Minister Gordon Brown apologized to Turing, saying: "On behalf of the British government, and all those who live freely thanks to Alan's work, I am very proud to say: we're sorry. You deserved so much better."