Germany is set to annul the convictions of gay men under a law criminalising homosexuality that was applied zealously in post-war Germany.
Justice Minister Heiko Maas is to overturn the convictions and create a "right to compensation".
About 50,000 men were convicted between 1946 and 1969, under a 19th-Century law that the Nazis had sharpened.
Homosexuality was decriminalised in 1969, but the legislation was not taken off the books entirely until 1994.
"We will never be able to eliminate completely these outrages by the state, but we want to rehabilitate the victims," Mr Maas said in a statement. "The homosexual men who were convicted should no longer have to live with the taint of conviction."
'Open wound'
For those with past convictions for being gay, the decision has been a long time coming.
In 2002, the government decided to overturn any convictions made during the Nazi period, but this did not include men convicted after the war.
Now a study commissioned by the Federal Anti-discrimination Agency has found the government is legally obliged to rehabilitate the men.
The author, professor Martin Burgi, said all convictions must be overturned, and suggest compensation should be offered for educational projects.
The head of the Anti-discrimination Agency says she is happy with the results. Christine Luders said that the "open wound in the rule of law" will need to be healed.
Germany has allowed civil partnerships since 2001, and gay couples have the same tax status and adoption rights as married couples.
Pressure is growing on the government to allow gay marriage, particularly after Ireland adopted it last year.