Updated

The British government has passed a law granting posthumous pardons to thousands of men who were convicted under now-abolished anti-homosexuality laws, and allowing those who are still alive to have their criminal records wiped clean.

The Ministry of Justice said Tuesday the pardons apply to men convicted for consensual same-sex 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 says the "hurt caused" by the historic convictions can never be undone, "but we have apologized and taken action to right these wrongs."

Calls for a general pardon have noted the 1954 suicide of World War II codebreaking hero Alan Turing after his conviction for "gross indecency."

He received a royal pardon in 2013.