The German government has granted a Turkish request to allow the possible prosecution of a TV comedian who wrote a crude poem about Turkish President Tayyip Erdogan, Chancellor Angela Merkel said.

Ankara has demanded to have comedian Jan Boehmermann prosecuted for insulting a foreign head of state.

Under a section of Germany’s criminal code, the government has to authorize prosecutors to pursue a case against the comedian.

The code, known as Paragraph 103, concerns insults against organs or representatives of foreign states. However, it is so rarely used that many German politicians and lawyers were previously unaware of its existence.

“Turkey has demanded prosecution of Jan Boehmermann. [The] German government, in accordance with established practice, studied the note; this process involved the Foreign Ministry, Ministry of Justice, Ministry of Internal Affairs and the Office of the Federal Chancellor. As a result, the federal government in regard to this incident, satisfies the request,” Merkel told reporters at the Chancellery in Berlin.

The chancellor went on to stress that it “means neither a prejudgment of the person affected nor a decision about the limits of freedom of art, the press and opinion.”

Merkel said that the government intends to repeal the law, effective in 2018.

“There were different opinions between the coalition partners – the conservatives and the SPD (Social Democrats),” Merkel added.

On Friday, German politicians from the “Green” party criticized Merkel’s decision to satisfy Ankara’s request, branding it a political mistake.

I believe Merkel’s decision is a political mistake. She has set up a trap for herself by politicizing the case, now she has to live with the accusation that the deal with Turkey [over the refugee crisis] became more important to her than freedom of speech,” Anton Hofreiter, head of the Green party, told TV channel N24.

Merkel should have made it clear from the start that we in Germany have a free press, while Erdogan should take better care of the press at home.

The head of the Social Democratic Party, Thomas Operman, also condemned Merkel’s move.

This decision is wrong. Prosecution of satire due to “lese-majeste” does not correspond with modern democracy,” Operman wrote on Twitter.

The German Union of Journalists (DJV) in their turn said such measures proposed by the chancellor do not correspond with German laws, adding that Merkel gave the “wrong signals” on the case to the Turkish government.

There was no need for the decision since the Turkish president has already filed a complaint to the Mainz Prosecutor.

On Monday, Erdogan filed a private lawsuit before sending a note to the German government demanding criminal prosecution of the presenter.

Boehmermann read the poem on Germany’s ZDF television two weeks ago. Although the broadcaster withdrew the piece from its archives, it said that no laws were broken.

However, Boehmermann warned ahead of time that the reading would breach regulation on insulting foreign leaders.

The Turkish government says the poem accused Erdogan of “repressing minorities, kicking Kurds, and slapping Christians while watching child porn.”

Turkey’s own press freedom has come under serious attack in recent months, including from Germany.

In March, Ankara reportedly pressured Berlin into removing a satirical clip aired by public broadcaster NDR, which criticized the president for his crackdown on freedom of speech, as well as the alleged shuffling of electorate votes and cracking down on women.

Earlier that month, a correspondent for Germany’s Der Spiegel magazine was forced to leave Turkey after his press credentials weren’t removed. The publication’s editor-in-chief accused Ankara of violating press freedom.

Also last month, employees of Turkey’s Zaman newspaper said they “feel like captives” following the government’s takeover of the daily. Since the paper’s seizure, it has has turned into a government mouthpiece, with the first edition under the new ownership immediately featuring a picture of Erdogan.

Meanwhile, two journalists from Turkey’s Cumhuriyet newspaper are being charged with espionage after publishing a report in 2014 which purported to show Turkey’s state intelligence agency helping to transfer weapons into Syria by truck.

The two spent 92 days in jail, almost half of it in solitary confinement, before the Constitutional Court ruled in February that their pre-trial detention was a violation of their rights.

The journalists’ detainment prompted criticism from international human rights groups, as well as from the EU and US Vice President Joe Biden, who said that Turkey was setting a poor example for the region by intimidating the media. Turkish Prime Minister Ahmet Davutoglu previously stated that the two journalists should be released from prison ahead of the trial.