Updated

Dr. Alan Turing, the British mathematician whose work breaking the German Enigma code was a vital contribution to victory in the Second World War, has received a posthumous pardon from Queen Elizabeth II more than 60 years after being convicted for homosexual activity.

Turing's pardon officially took effect Tuesday after the Queen gave the so-called Royal Prerogative of Mercy following a request earlier this year by Justice Secretary Chris Grayling.

The pardon brings the end to a long campaign to clear Turing's name following his death in 1954.

Turing was the most prominent of a number of code-breakers who worked in secret at Bletchley Park estate in the town of Milton Keynes. Historians believe that the breaking of the Enigma code shortened the war and saved many thousands of lives.

Turing is also considered one of the fathers of computer science and developed the so-called Turing Test in 1950 to determine whether a computer had attained artificial intelligence.

In 1952, Turing admitted having a homosexual relationship to the police, who were investigating the burglary of Turing's house by an acquaintance of Turing's partner. Turing pleaded guilty to one count of gross indecency and accepted a treatment of chemical castration with female hormones to avoid imprisonment. His security clearance was revoked as a result of his conviction. His death two years later was ruled a suicide by cyanide poisoning. Homosexuality was not decriminalized in England until 1967.

Click for more from Sky News