The row could jeopardise the EU's controversial migrant deal with Turkey.

The German government confirmed yesterday that it had received a 'formal request' from Turkey over the weekend indicating that it wants to press charges in the case.

If Mrs Merkel agrees to allow the prosecution, she will face accusations of limiting free speech to placate the authoritarian Mr Erdogan.

But if she refuses it could put the migrant deal with Turkey - which she personally brokered - at risk.

Jan Böhmermann, one of Germany's most successful young comedians, faces up to five years in prison over a poem in which he referred to Mr Erdogan as a "goat-f*****" and described him as watching child pornography.

Insulting a foreign head of state is illegal under German law, but a prosecution can only take place if a foreign government requests it.

Any prosecution also requires the express authorisation of the German government - leaving Mrs Merkel in a difficult position.

Turkey had been thought to be prepared to let the matter lie after Mrs Merkel personally intervened with a phone call to Ahmet Davutoglu, the Turkish prime minister, and issued a public condemnation of the poem.

A spokesman said the German government would "consider the request carefully" before coming to a decision.

Mr Böhmermann is hugely popular in Germany and could quickly become seen as a popular martyr.

He has defended his poem as a satirical response after Turkey summoned the German ambassador to complain about a song mocking Mr Erdogan that was aired on German television.

He said it was intended to show the Turkish president the difference between satire and slander.