The German parliament has agreed to quash the convictions of gay men who were criminalised under historical anti-homosexuality laws.
Survivors who were convicted should also receive €3,000 (£2,630) as well as €1,500 (£1315) for each year they spent in prison, according to the BBC.
It is believed that around 5,000 people will be entitled to the compensation.
However, only those who had sex with people aged 16 or older will be entitled, as the Christian Democratic Union party put pressure on parliament to raise the age from 14 in the draft bill to 16.
The legislation has been approved by the lower house of parliament, and although it still needs to be approved by the upper house, it is expected to pass.
The law against homosexuality can be dated back to 1871, however it was enforced very little until the Nazi era. In 1994 it was fully repealed in West Germany.
The ruling had said that "sexual acts contrary to nature...be it between people of the male gender or between people and animals" were outlawed. Despite this, women having sex with each other was not criminalised.
Whilst Nazis ruled in Germany, the punishment for being gay was 10 years of labour and many were sent to concentration camps and prison, leading to their deaths.
German Justice Minister Heiko Maas said that the law "created unimaginable suffering, which led to self-denial, sham marriages, harassment and blackmail."
But whilst Helmut Metzner, who sits on the board of the Lesbian and Gay Federation said the quashing is a "historic step forward" he claimed the compensation was not enough as many victims could have been ostracised from society and sacked from their jobs, leading to lower pensions.