Thousands of gay and bisexual men convicted of now-abolished sexual offences have been posthumously pardoned.
Dubbed the “Alan Turing law”, it will in effect act as an apology to those convicted for consensual same-sex relationships before homosexuality was decriminalised in England and Wales in 1967.
It comes after decades of campaigning from the LGBT community and after the family of the Enigma code breaker Alan Turing delivered a petition to Downing Street before the 2015 general election.
Justice minister Sam Gyimah said it was a “truly momentous day”.
Public pressure led to the major political parties pledging to introduce the “Alan Turing law” – in memory to the man Winston Churchill described as making “the single biggest contribution to the allied victory” in the Second World War.
The pardons, first announced last year, have now been officially rubber-stamped after the Policing and Crime Bill received Royal Assent.
It enshrines in law pardons for those convicted of consensual same-sex relationships before laws were changed.
Mr Gyimah added: “This is a truly momentous day. We can never undo the hurt caused, but we have apologised and taken action to right these wrongs.
“I am immensely proud that Turing's Law has become a reality under this Government.”
The new law will also see statutory pardons granted to the living.
However, this will only apply in cases where individuals have successfully applied through the Home Office’s disregard process to have historic offences removed.
The charity Stonewall said: “Another important milestone of equality has been secured in law.
“Gay and bi men, cautioned or convicted for kissing, holding hands or just chatting up men, can now have these ‘crimes’ deleted from their record.
“The more equality is enshrined into our law books, the stronger our equality becomes, and the stronger we as a community become.
“This is not just equality for gay and bi men; the passing of this law is justice.”
Liberal Democrat peer John Sharkey, who authored the original amendment to the Policing and Crime Bill, said: “This is a momentous day for thousands of families up and down the UK who have been campaigning on this issue for decades.
“It is a wonderful thing that we have been able to build on the pardon granted to Alan Turing during Coalition and extend it to thousands of men unjustly convicted for sexual offences that would not be crimes today.”
Mr Turing, the Enigma code breaker responsible for decrypting Nazi messages, was granted a posthumous royal pardon in 2013 – 61 years after he was charged at Manchester police station over homosexual activity.
The pioneering mathematician, whose code-breaking skills are said to have shortened the Second World War by two to four years, lost his job with the secret service following a conviction for gross indecency and was forced to undergo chemical castration by a series of injections of female hormones.
Two years later Mr Turing took his own life – and it is estimated that around 49,000 were convicted under similar outdated laws until homosexuality was decriminalised.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies