BERLIN (Reuters) - The German cabinet on Wednesday decided to abolish the crime of lese majeste almost a year after a comedian was accused of offending a foreign leader after reciting an obscene poem about Turkish President Tayyip Erdogan.

Jan Boehmermann, host of the late-night "Neo Magazin Royale" on the public ZDF channel is pictured during a TV show of Markus Lanz in Hamburg, Germany, August 21, 2012. REUTERS/Morris Mac Matzen

Ministers in Chancellor Angela Merkel’s cabinet agreed to scrap the relevant passage in the penal code, which was all but forgotten until Jan Boehmermann went on television to declaim the verses linking Erdogan to bestiality and child pornography.

The outraged Turkish leader filed a complaint with German prosecutors on the basis of that passage in the law.

“The idea of lese majesty arose in an era long gone by. It no longer belongs in our criminal law,” Justice Minister Heiko Maas said.

He added that insulting a foreign leader would remain a punishable offense but no more or less than offending anyone else. The Bundestag lower house of parliament still has to decide on the law change.

Boehmermann recited the poem on television last March.

A section of the German criminal code prohibits insults against foreign leaders but leaves it to the government to decide whether to authorize prosecutors to pursue such cases.

Merkel was widely criticized for allowing prosecutors to pursue the case against Boehmermann, which arose at a time of tense bilateral relations because of the massive flow of migrants from the Middle East through Turkey. Berlin needed Ankara’s cooperation to keep them from continuing on to Europe.

While prosecutors have dropped that investigation, a civil law dispute between Erdogan and Boehmermann is not yet over. A district court in Hamburg will decide on Erdogan’s action for an injunction on Feb. 10.

Last year the Hamburg court issued a preliminary injunction banning re-publication of parts of the poem.