Thousands of men who were convicted under now-abolished British laws against homosexuality are to receive posthumous pardons, the government announced Thursday. Those who are still alive can 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 decriminalized 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 offenses who would be innocent of any crime today," he said.

Calls for a general pardon have been building since World War II 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 World War II, 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.

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."