Germany's justice minister says he will draw up legislation to annul the convictions of gay men under a law criminalizing homosexuality that was applied zealously in post-World War II West Germany.

Heiko Maas' announcement Wednesday that he will seek to overturn the convictions and create a "right to compensation" came after a study commissioned by the Federal Anti-Discrimination Agency found the government has an obligation to legally rehabilitate the men.

Some 50,000 men were convicted between 1949 and 1969 under the law, which was introduced in the 19th century, toughened under Nazi rule and retained in that form by West Germany.

Homosexuality was decriminalized in 1969 but the legislation wasn't taken off the books entirely until 1994.