Germany’s cabinet has backed a bill to clear men handed sentences for homosexuality after World War Two under a Nazi-era law.
The notorious Paragraph 75 of the penal code was eventually relaxed in 1969, but not before 50,000 men were convicted.
Many were sent to jail and some took their own lives because of the stigma.
Justice Minister Heiko Maas said it was a flagrant injustice and those still alive would be given compensation.
Condemning the convictions as the “crimes of the state”, he said the men’s rehabilitation was long overdue.
“It was only because of their love of men and their sexual identity that they were persecuted, punished and outlawed by the German state,” he said.
The cabinet decided on Wednesday to back a bill annulling the sentences and handing compensation to all those affected. Every man convicted would receive a €3,000 (£2,600; $3,240) lump sum plus a further €1,500 for each year spent in jail.
The German government’s decision comes months after the UK said it was pardoning 65,000 gay and bisexual men who were convicted under the Sexual Offences Act that criminalised private homosexual acts in England and Wales until 1967 and later in Scotland and Northern Ireland.
Germany to quash 50,000 gay convictions