By Noah Barkin and Michelle Martin
BERLIN (Reuters) - Germany's Angela Merkel agreed on Friday to allow prosecutors to pursue a case against a German comedian who read out a crude poem about Turkey's President Tayyip Erdogan, prompting criticism that the chancellor had failed to protect free speech.
Erdogan had demanded that Germany press charges against Jan Boehmermann after he mocked the Turkish leader in a show on German public broadcaster ZDF on March 31, suggesting that he hits girls, watches child pornography and engages in bestiality.
A section of the German criminal code prohibits insults against foreign leaders but leaves it to the government to decide whether to authorise prosecutors to pursue such cases.
This put Merkel in an awkward position. She has been the driving force behind a controversial European Union deal with Turkey to stem the flow of refugees into Europe and critics have already accused her of ignoring violations of human rights and press freedoms in Turkey to secure its cooperation.
The chancellor made clear in a statement that the decision to allow prosecutors to investigate was not a verdict on the merits of the case itself.
But she came under sharp criticism from the Social Democrats (SPD), her centre-left coalition partner, which had wanted the Turkish request to be rejected.
"This was the wrong decision in my view," said Thomas Oppermann, leader of the SPD in parliament. "Prosecution of satire due to 'lese majeste' does not fit with modern democracy."
Anton Hofreiter, parliamentary leader of the opposition Greens, said Merkel must now "live with the accusation that the deal with Turkey is more important to her than defending freedom of the press".
Sahra Wagenknecht of the far-left Linke accused Merkel of kowtowing to the "Turkish despot" Erdogan.
Boehmermann, an impish-looking 35-year-old, is known for pushing the boundaries of satire. Last year he claimed to have manipulated a video of Greece's then-finance minister Yanis Varoufakis in which he is shown giving the middle finger - known as the "Stinkefinger" in German - to Berlin for its tough stance in the debt crisis. The video infuriated German politicians
The cult comedian made clear before reciting the poem about Erdogan that he was intentionally going beyond what German law allowed.
ZDF has since removed a video of the poem from its website. But Boehmermann has received backing from prominent German artists and a poll for Focus magazine showed 82 percent viewed the poem as defensible.
He is reportedly under police protection and cancelled his last show on ZDF.
In giving her statement, Merkel pressed Turkey - a candidate country for European Union membership - to uphold the values of freedom of expression, the press and art.
She justified the decision to accept the Turkish request by pointing to the close and friendly relationship Berlin shares with Ankara, referring to the three million people with Turkish roots who live in Germany, the strong economic ties between the countries and their cooperation as NATO allies.
But the Association of German Journalists (DJV) said Merkel had sent the "wrong signal" to the Turkish government and added that her references to violations of the right to freedom of press and opinion in Turkey had not made up for that.
A Turkish group called the Union of European Turkish Democrats, which has posted videos online supporting Erdogan, filed a complaint with Austria's media watchdog on Friday over Austrian newspaper Oesterreich reprinting parts of Boehmermann's poem under the headline 'Is this confused poem art or a scandal?'
Merkel said the German government planned to remove the section of the criminal code that requires it to grant permission for prosecution in such cases.
(Reporting by Noah Barkin, Caroline Copley and Holger Hansen in Berlin and Shadia Nasralla in Vioe; Writing by Michelle Martin and Noah Barkin; Editing by Gareth Jones)