Berlin (AFP) - Chancellor Angela Merkel on Friday authorised criminal proceedings sought by Turkey against a German TV comedian over a crude satirical poem about President Recep Tayyip Erdogan that has sparked a bitter row over free speech.

In a surprise decision that exposed rifts within Merkel's government, she said the German judiciary would now have to decide whether the popular comic, Jan Boehmermann, could be convicted under rarely enforced lese-majeste legislation.

"The government will give its authorisation in the case at hand," Merkel told reporters in a hastily arranged televised statement.

A probe under section 103 of the criminal code -- insulting organs or representatives of foreign states -- can only go forward with the approval of the federal government.

The offence can carry a punishment of up to three years in prison.

Merkel said the government agreed it would scrap what many labelled an outdated statute by 2018 as a result of the embarrassing affair.

Ankara this month filed a formal request for a criminal inquiry to be launched in Germany against Boehmermann, who accused Erdogan of bestiality and paedophilia in the so-called "Defamatory Poem".

Boehmermann gleefully admitted he was flouting Germany's legal limits on free expression, but has kept a lower profile since the furore erupted.

The comedian was reacting to Ankara's decision last month to summon Germany's ambassador in protest at another satirical song broadcast on German TV which lampooned Erdogan in far tamer language.

- Courts have last word -

The case comes at an extremely awkward time as Europe is relying on Ankara to implement a pact spearheaded by Merkel to curb the flow of migrants taking boats headed for the European Union from Turkey's shores.

It exposed Merkel to criticism she was compromising basic values to win Erdogan's continued cooperation.

Merkel -- who had previously labelled Boehmermann's poem "deliberately insulting" -- had pledged Turkey's request would be "very carefully" examined, even as she underlined the German constitution's free speech protections.

Story continues

On Friday she said her government, after heated internal debate, had concluded that only the judiciary should decide whether Boehmermann had committed a criminal offence.

"In a state under the rule of law, it is not a matter for the government but rather for state prosecutors and courts to weigh personal rights issues and other concerns affecting press and artistic freedom," she said.

Merkel stressed that Berlin's decision did not amount to a "prejudgement" on his legal culpability and that "prosecutors and courts" would have the last word.

She also highlighted Germany's "close and friendly relations" with Turkey, which she noted was a NATO ally, an EU membership candidate, and the country of origin of three million people living in Germany.

She said while Turkey deserved "respect", she would continue to voice her "deep concerns" about threats to media freedom there.

Prosecutors last week opened a preliminary probe against Boehmermann, 35, after complaints by dozens of viewers.

- 'Unbearable kowtowing' -

German Foreign Minister Frank-Walter Steinmeier said his Social Democrats, junior partners in the ruling coalition, had opposed the approval of Turkey's request and were overruled.

"In cases in which there is a conflict between media satire and the protection of individuals' honour, the restraint of the government is particularly advisable," he told reporters.

The head of the German Journalists' Federation, Frank Ueberall, blasted the government's decision as "absurd", saying it sent "the wrong message to the Turkish government" about civil liberties.

Sahra Wagenknecht of the far-left opposition party Die Linke called it "unbearable kowtowing" to the "Turkish despot Erdogan" at the "expense of press freedom in Germany".

However news website Spiegel Online defended Merkel, saying she had demonstrated the independence of the German judiciary to Erdogan "who had nothing better to do than to complain at the highest level about a German jokester".

"It is wrong to speak of buckling or caving -- Merkel showed diplomatic finesse in putting the ball back in Turkey's court," it said.

Turkish Economy Minister Mustafa Elitas called it "the right decision", saying "an insult against the president" represented "an insult against the whole state".

Erdogan has come in for fierce Western criticism of late over his increasingly authoritarian rule.

US President Barack Obama warned that Turkey's approach towards the media was taking it "down a path that would be very troubling" after two leading opposition journalists were put on trial.

In response Erdogan defiantly declared he would not take "lessons in democracy" from the West.