Germany is to officially pardon 50,000 men convicted under a Nazi-era law criminalising homosexuality that continued to be enforced after the Second World War.

Paragraph 175 was used by Adolf Hitler’s regime to send thousands of people to concentration camps but even after the Holocaust, it was not dropped by the new West German government.

Following decades of work by campaigners, anyone convicted under the law will be pardoned and those living will gain the automatic right to compensation.

Angela Merkel's cabinet of conservatives and centre-left Social Democrats approved a bill granting the pardons on Wednesday but it still requires parliamentary approval.

It foresees compensation of €3,000 (£2,600) for each conviction, plus €1,500 (£1,300) for every year of jail time that convicted men started.

“The rehabilitation of men who ended up in court purely because of their sexuality is long overdue,” said Heiko Maas, the German justice minister.

“They were persecuted, punished and ostracised by the German state just because of their love for men, because of their sexual identity.”

Mr Maas described past judgements as “blatant injustices”, adding: “We shall never be able to completely atone for the crimes of the judicial system, but we want to rehabilitate the victims.

“Prosecuted gay men should no longer have to live with the stigma of their conviction.

Remembering the Holocaust Show all 16 1 /16 Remembering the Holocaust Remembering the Holocaust 80,000 shoes line a display case in Auschwitz I. The shoes of those who had been sent to their deaths were transported back to Germany for use of the Third Reich Hannah Bills Remembering the Holocaust Barracks for prisoners in the vast Auschwitz II (Birkenau) camp. Here slept as many as four per bunk, translating to around one thousand people per barracks. The barracks were never heated in winter, so the living space of inmates would have been the same temperature as outside. Hannah Bills Remembering the Holocaust Hannah Bills Remembering the Holocaust Sign for the Auschwitz Museum on the snowy streets of Oswiecim, Poland Hannah Bills Remembering the Holocaust The Gateway to hell: The Nazi proclamation that work will set you free, displayed on the entrance gate of Auschwitz I Hannah Bills Remembering the Holocaust A disused watchtower, surveying a stark tree-lined street through Auschwitz I concentration camp Hannah Bills Remembering the Holocaust Stolen property of the Jews: Numerous spectacles, removed from the possession of their owners when they were selected to die in the gas chambers of Auschwitz Hannah Bills Remembering the Holocaust A sign bearing a skull and crossbones barks an order to a person to stop beside the once-electrified fences which reinforced the Auschwitz I camp Hannah Bills Remembering the Holocaust The peace and the evil: Flower tributes line a section of wall which was used for individual and group executions Hannah Bills Remembering the Holocaust Life behind bars: Nazi traps set to hold the Third Reich’s ‘enemies’. In Auschwitz’s years of operation, there were around three hundred successful escapes. A common punishment for an escape attempt was death by starvation Hannah Bills Remembering the Holocaust Burying the evidence: Remains of one of the several Auschwitz-Birkenau gas chambers Hannah Bills Remembering the Holocaust Hannah Bills Remembering the Holocaust The three-way railway track at the entrance to Auschwitz-Birkenau camp. This was the first sight the new camp arrivals saw upon completion of their journey. Just beside the tracks, husbands and wives, sons and daughters and brothers and sisters were torn from each other. Most never saw their relatives again Hannah Bills Remembering the Holocaust A group of visitors move through the Auschwitz-Birkenau camp. Viewed from the main entrance watchtower of Auschwitz-Birkenau Hannah Bills Remembering the Holocaust "The Final Solution": The scale of the extermination efforts of the Nazis at Auschwitz-Birkenau can be seen by comparing the scale of the two figures at the far left of the image to the size of the figure to the left of the railway tracks' three point split Hannah Bills Remembering the Holocaust Each cattle car would transport up to one hundred people, who could come from all over Europe, sometimes from as far away as Norway or Greece. Typically, people would have been loaded onto the trucks with around three days food supply. The journey to Auschwitz could sometimes take three weeks. Hannah Bills

“Paragraph 175 disrupts professional paths, destroys careers and blights lives.

“The few victims who are still alive today should finally be afforded justice.”

The minister pledged financial support for the Magnus Hirschfeld Foundation, which has documented the persecution and raising awareness of the effects of Paragraph 175.

The group hailed “justice, finally” on Wednesday, saying the draft law was an important step on a long road or rehabilitation for victims.

The Lesbian and Gay Federation in Germany “welcomes the fact that, after long decades of ignorance, legal consequences are being drawn from the serious mass human rights violations that were committed against homosexual people by the democratic state,” said its spokesman, Helmut Metzner.

Paragraph 175 was introduced in to Germany’s criminal code in 1871 but was broadened by the Nazis in 1935, with the ensuing prosecutors see thousands of gay men and lesbians sent to concentration camps during the Holocaust.

A Reichstag committee had voted to repeat the law six years before but Adolf Hitler’s government changed it to allow for the persecution of any “lewd act” between men, regardless of physical contact.

Even after concentration camps were liberated, some prisoners were forced to serve out two-year prison sentences under Paragraph 175, while those freed faced stigmatisation.

Although East Germany abolished the Nazi amendments in 1950, West Germany did not and had them confirmed by its constitutional court.

Chris Bryant makes an emotional plea for further action in pardoning gay men

The move caused an estimated 100,000 men to be drawn into legal proceedings between 1949 and 1969, with 50,000 convicted and some taking their own lives.

Homosexuality was decriminalised in Germany 1969 but the legislation was not formally removed until 1994.

Six years later, Germany's parliament approved a resolution regretting the fact that Paragraph 175 was retained after the war and in 2002 it annulled the convictions of gay men under Nazi rule, but not afterwards.

The new law will exclude men who were convicted for homosexual activities with children or for acts that involved violence or threats.

It also will apply to men convicted in communist East Germany, which had a milder version of Paragraph 175 on the books and decriminalised homosexuality in 1968.

A total of around some 68,300 people were convicted under various forms of the law in both German states.

Mr Maas said the strength of a country was marked by the “courage to correct its own mistakes”, adding: “We have not just the right but the duty to act.”

The move comes months after the British government announced that thousands of gay and bisexual men convicted under now abolished sexual offences would be pardoned under the “Alan Turing law”.

It was named after the pioneering mathematician, whose code-breaking skills are said to have shortened the Second World War by years, who killed himself after being chemically castrated as punishment for “gross indecency”.