A 99-year-old Holocaust survivor who was imprisoned for being gay after returning home to Germany has been denied compensation for his ordeal.

Wolfgang Lauinger spent five months behind bars in 1950 due to German laws at the time making sexual relations between two men illegal.

The offence was later decriminalised in both East and West Germany during the late 1960s.

In July of this year, the German government passed a bill allowing men imprisoned under the anti-gay law to be compensated – with €30m (£26.5m, $35.5m) set aside for victims.

Each surviving man is due to get €3,000 on top of €1,500 for each year spent in prison.

But Lauinger, who was forced to flee Nazi Germany during the Second World War amid the persecution of Jews, had his compensation claim denied in October.

This is despite the pensioner having fought for gay men to receive compensation – a campaign that even saw him invited to the Bundestag.

"I regret that I can not give you a more favourable answer," read the response from Germany's Ministry of Justice, according to Buzzfeed Germany.

While Lauinger was detained in prison while awaiting his trial, he was never convicted and thus is technically excluded from the compensation law.

He said he wasn't surprised when he was denied any money.

"I laughed when I got a rejection," he said.

"The sense of the thing is wonderful, but the law is not a real rehabilitation of the people who suffered from the system," he added.

"I'm 99 now. I saw the law as a way to make amends. And I have made an application like any good citizen of this country.

"But the law has been made a farce. What is the difference for a normal person if you are in prison for five months, whether you are released or are acquitted?"

About 50,000 men were punished under the law, which was drawn up in the 19th Century and strengthened under the Nazis.

The vast majority of those persecuted are no longer alive.

Of the 63 requests for compensation, the government has so far approved 31, according to reports. Three have been rejected, including Lauinger's.

"For a long time in my life, I thought my homosexuality was my personal affair – just as the sexuality of every heterosexual is his personal matter," he continued.

"At a ripe age, I had to revise this view. Unfortunately, as long as people are persecuted for this most personal thing in the world, it is not a purely private matter."

Lauinger said he hopes to continue the fight beyond his 100th birthday.

"For me, the game continues, until I am no longer there. And I hope it's over before I die," he said.

When asked about Lauinger's predicament, German Justice Minister Heiko Maas said: "It concerns me that the law cannot be applied in this case."