Second World War code-breaker Alan Turing has been given a posthumous royal pardon for a 61-year-old conviction for homosexual activity.
Dr Turing, who played a pivotal role in breaking the Enigma code, arguably shortening the war by at least two years, was chemically castrated following his conviction in 1952.
His conviction for "gross indecency" led to the removal of his security clearance and meant he was no longer able to work for Government Communications Headquarters (GCHQ) where he had continued to work following his service at Bletchley Park during the war.
Dr Turing, who died aged 41 in 1954 and is often described as the father of modern computing, has been granted a pardon - effective from today - under the Royal Prerogative of Mercy by the Queen following a request from Justice Secretary Chris Grayling.
He said: "Dr Alan Turing was an exceptional man with a brilliant mind. His brilliance was put into practice at Bletchley Park during the Second World War where he was pivotal to breaking the Enigma code, helping to end the war and save thousands of lives.
"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.
"Dr Turing deserves to be remembered and recognised 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."
Dr Turing died of cyanide poisoning and an inquest recorded a verdict of suicide, although his mother and others maintained his death was accidental.
There has been a long campaign to clear the mathematician's name, including an e-petition backed by 37,404 signatures and private member's bill, along with support from leading scientists such as Stephen Hawking.
The Justice Secretary has the power to ask the Queen to grant a pardon under the Royal Prerogative of Mercy for civilians convicted in England and Wales.
A pardon is only normally granted when the person is innocent of the offence and where a request has been made by someone with a vested interest such as a family member. But on this occasion a pardon has been issued without either requirement being met.
Prime Minister David Cameron said: "Alan Turing was a remarkable man who played a key role in saving this country in World War Two by cracking the German Enigma code.
"His action saved countless lives. He also left a remarkable national legacy through his substantial scientific achievements, often being referred to as the father of modern computing."
Iain Stewart, Conservative MP for Milton Keynes South, who was involved in the campaign to secure a royal pardon, said it was a "just reward for a man who was stripped of his honour, his work and the loyalty he showed his nation".
Professor Dame Nancy Rothwell, president and vice chancellor of the University of Manchester, where Dr Turing had worked, also welcomed the news and said: "His legacy will live on as one of the most significant scientists of his or any other generation."
Gay rights campaigner Peter Tatchell said the granting of the royal pardon was "long overdue" and called for the same treatment to be given to others convicted in similar circumstances.
A GCHQ spokesperson said: "We are delighted about the pardon and point to the personal tribute that Director GCHQ made to Alan Turing in a speech at the University of Leeds in Oct 2012.
"Sir Iain Lobban said at the time: 'If I had to single out one piece of Turing's legacy to GCHQ today, it would be the way that his contribution was part of the irrevocable change that turned the Code and Cypher School from being the mainly cryptanalytic bureau it was between the wars to becoming the highly technological intelligence organisation that GCHQ is today'."
:: Watch Sky News live on television, on Sky channel 501, Virgin Media channel 602, Freeview channel 82 and Freesat channel 202.