BERLIN (Reuters) - A Hamburg court issued a preliminary injunction on Tuesday banning re-publication of sections of a satirical poem by a German comedian mocking Turkish President Tayyip Erdogan, saying they amounted to abuse and libel.
Comedian Jan Boehmermann recited a poem on television in March suggesting Erdogan engaged in bestiality and watched child pornography, prompting the Turkish leader to file a complaint with prosecutors that he had been insulted.
In a separate complaint, lawyers for Erdogan also asked a court in Hamburg to ban re-publication of the poem.
In its injunction, which applies to the whole of Germany, the Hamburg court marked in red 18 of the poem's 24 verses, which it said were "abusive and defaming."
It said its decision, which may be appealed, was based on the need to find a balance between preserving the right to artistic freedom and the personal rights of Erdogan.
"Through the poem's reference to racist prejudice and religious slander as well as sexual habits the verses in question go beyond what the petitioner (Erdogan) can be expected to tolerate," the Hamburg court wrote.
The six verses the court did not ban, include references to Turkey's treatment of minorities.
Erdogan, a crucial partner for Merkel in tackling Europe's migrant crisis, had demanded Germany press charges against Boehmermann.
Chancellor Angela Merkel has drawn criticism for allowing prosecutors to pursue the case against Boehmermann.
Under Germany's criminal code, insults against foreign leaders are not allowed but the government can decide whether to authorize prosecutors to go ahead.
The affair, which has turned into a diplomatic spat, has opened Merkel to accusations she has become too accommodating towards Erdogan in pursuing a controversial European Union deal with Turkey to stem the flow of refugees into Europe.
Critics had already accused her of ignoring human rights violations and actions against journalists in Turkey, a candidate for EU membership.
An MP of Merkel's conservatives read the poem out in parliament last week.
Merkel is widely seen as causing the problem in the first place in describing the poem to Turkish Prime Minister Ahmet Davutoglu as "deliberately insulting", something she herself has said was "in retrospect a mistake".
Prosecutors in the western German city of Mainz who are dealing with the Boehmermann case said it was unclear when a decision would be made on whether to go ahead with the case.
(Reporting by Joseph Nasr; editing by Ralph Boulton)