British mathematician Alan Turing, who played a central role in breaking the German enigma code during World War II, has been given a posthumous royal pardon.
His conviction for homosexual activity in 1952 led to the removal of his security clearance for high level research and meant he had to stop the code-cracking work.
The pardon was granted under the Royal Prerogative of Mercy after a request by UK Justice Minister Chris Grayling, the BBC reports.
Mr Grayling said the research the mathematician carried out during the war at Bletchley Park undoubtedly shortened the conflict and saved thousands of lives.
His work helped accelerate Allied efforts to read German Naval messages enciphered with the Enigma machine. He also contributed some more fundamental work on codebreaking that was only released to public scrutiny in April 2012.
"His 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 Mr Grayling.
The pardon comes into effect on 24 December.
Alan Turing died in June 1954 from cyanide poisoning and an inquest decided that he had committed suicide.
However, biographers, friends and other students of his life dispute the finding and suggest his death was an accident.
Dr Sue Black, a computer scientist, was a key figure in the long campaign to win a pardon.
She told the BBC that she hoped all the men convicted under the anti-homosexuality law would now be pardoned.