German Chancellor Angela Merkel’s cabinet approved legislation Wednesday to reverse the convictions of 50,000 men sentenced for homosexuality under a Nazi-era law that remained intact several years after World War II. The proposal, which still has to be approved by the German parliament to be enacted, would compensate those convicted with a lump sum of roughly $3200 and an additional $1,600 for every year the men “suffered a deprivation of liberty” behind bars, Agence French Presse reported Wednesday.

The potential legislation represented a victory for German LGBT activists after a decade-long effort to exonerate the names of gay men who were forced to live with a criminal record under Article 175 of the penal code. Its fate depended on the German parliament, where Merkel’s right-left Christian Democratic Union of Germany political party enjoys a large majority.

Read: Arab Twitter Trend: 'I Love Gays' Promotes LGBT Rights In Middle East

Germany’s Article 175 outlawed “sexual acts contrary to nature…be it between people of the male gender or between people and animals.” Sexual intercourse between women, however, was not considered illegal under the law.

Though Article 175 was originally created in 1871, it was rarely enforced until the Nazi’s took control of Germany and toughened the law in 1935, sentencing those convicted to 10 years of hard labor. More than 42,000 gay men were convicted by Nazis under the law and incarcerated in concentration camps.

Roughly 5,000 of those men are still alive today.

Two decades after the Nazis were defeated in World War II, East Germany dropped the law from its penal code in 1968. West Germany reverted to the version of Article 175 that was in place before the Nazi’s toughened its penalty. A unified Germany fully repealed Article 175 in 1994.

The newly proposed law would act along the same lines as Britain’s “Turing Law” created this earlier year, which wiped clean the criminal records of thousands of British men convicted of being gay before the country decriminalized homosexuality in 1967, the New York Times reported. The British law was named after Alan Turing, who was a war hero in World War II before being convicted of homosexuality in 1952 and forced to undergo chemical castration treatments. Turing killed himself two years later at the age of 41.

Germany has a larger LGBT population than any other European nation, with 7.4 percent of Germans identifying themselves as LGBT and 10.9 percent saying they weren’t exclusively straight, according to a 2016 survey by Berlin’s Dalia Research that interviewed 12,000 people across 28 European countries, Vice News reported.