Germany will compensate and annul the convictions of 50,000 men for homosexuality under a law introduced during the Nazi era which remained in force after the war, the government said Wednesday.
"We can never completely erase the travesty of justice, but we want to rehabilitate the victims," Justice Minister Heiko Maas said in a statement. "They should not have to live with the stigma of conviction any longer."
Article 175 of the penal code outlawed "sexual acts contrary to nature... be it between people of the male gender or between people and animals".
The law introduced in 1935 by the Nazis carried a sentence of 10 years of forced labour.
More than 42,000 men were convicted under the penal code in the Third Reich, and sent to prison or concentration camps.
These were all rehabilitated by a law in 2002 that also annulled convictions against army deserters during Nazi-rule.
But article 175 remained in force after the war, remaining the only vestige of Nazi persecution, leading to 50,000 convictions in West Germany.
In East Germany, it was scrapped from the penal code in 1968. In West Germany the law remained largely in place until 1969 and was not fully repealed until 1994.
"Article 175 was unconstitutional from the outset. The old rulings are unjust," said Maas, adding that the government backed efforts by the Magnus Hirschfeld foundation to document the cases because "it is out of the question to annul 50,000 convictions without the public knowing what it had been all about."