London: Thousands of men who were convicted under now-abolished British laws against homosexuality are to receive posthumous pardons, the government announced on Thursday. Those who are still alive will be eligible to have their criminal records wiped clean.

The Ministry of Justice said the pardons apply to men convicted for consensual same-sex sexual relations before homosexuality was decriminalised several decades ago. Men living with convictions can apply to the government to have their names cleared.

Justice Minister Sam Gyimah said the government was trying “to put right these wrongs.”

“It is hugely important that we pardon people convicted of historical sexual offences who would be innocent of any crime today,” he said.

Calls for a general pardon have been building since the Second World War codebreaker Alan Turing was awarded a posthumous royal pardon in 2013.

The computer science pioneer helped crack Nazi Germany’s secret codes by creating the “Turing bombe,” a forerunner of modern computers. His work helped shorten the war, and he was an innovator of artificial intelligence.

After the war, Turing was prosecuted for having sex with a man, stripped of his security clearance and forcibly treated with female hormones. He died in 1954 at age 41 after eating an apple laced with cyanide.

A few other countries, including Canada and New Zealand, are considering pardons for people convicted under now-repealed laws against gay sex.

Gay-rights advocacy groups in the US said they knew of no US state, which had contemplated similar action.

However, the US military — after lifting a ban that prevented gays from serving openly in the ranks — adopted a policy which enabled gay soldiers who had been forced out to upgrade their discharges from dishonourable to honourable.

Sex between men remained illegal in England until 1967 — and even later in Scotland and Northern Ireland. The age of consent for gay people was not lowered to 16, the same as for heterosexuals, until 2001.

Many gay rights campaigners welcomed Thursday’s announcement. But some said the government should go further and issue a blanket pardon, rather than making men apply individually to have their criminal records vacated.

Others said they wanted an apology, not a pardon.

“To accept a pardon means to accept that you were guilty. I was not guilty of anything,” said 94-year-old writer George Montague, who was convicted of gross indecency — then a commonly used charge for sex between men — in 1974.

“I think it was wrong to give Alan Turing, one of the heroes of my life, wrong to give him a pardon,” Montague told the BBC. “What was he guilty of? Being born only able to fall in love with another man.”