BERLIN (Reuters) - Many Germans are rallying behind cult comedian Jan Boehmermann who has been forced to go underground because of the storm he unleashed with a sexually crude satirical poem about Turkey’s Tayyip Erdogan.

The Turkish president and government have filed legal complaints against Boehmermann for the “offensive poem”, handing Chancellor Angela Merkel a political dilemma at a time when she needs Ankara’s help to stem an influx of migrants.

After initial public scepticism over the poem about Erdogan, which refers to bestiality alongside alleged mistreatment of Kurds and Christians, Germans are now championing artistic freedom, a sensitive topic given the country’s 20th century history of Nazi and Communist repression.

A poll of more than 61,000 readers of Focus Online magazine showed 82 percent of them viewed the poem as defensible. Some 78 percent thought the German government should defend Boehmermann.

Under an unusual section of Germany’s criminal code, the government must authorize prosecutors to investigate an individual suspected of insulting a foreign head of state in response to a formal demand for prosecution from a foreign government - in this case the Turkish government.

On Wednesday a group of prominent German artists sent an open letter to Mainz prosecutors asking them to stop their investigations, and numerous comedians have backed Boehmermann, even though they may not find the poem very funny.

“I think Boehmermann’s poem is adolescent,” comedian Dieter Nuhr told Spiegel Online, but asked if he favored a prosecution he said: “Thats is not for me to say, however: no.”

“Perhaps Erdogan can write a counter-poem. Then you can have an argument between the two of them to see who is worse at it,” said Nuhr, a recent winner of Germany’s comedy prize.

Idil Baydar, known for her comic role as an 18-year-old Turkish-German woman, told Spiegel: “It’s not the greatest poem of all time, but Boehmermann does good stuff... I find it completely okay that he expresses himself like this.. That’s satire.. He was doing his job.”

Before reading his poem, Boehmermann referred to a satirical song broadcast on NDR television that had mocked Erdogan for his authoritarian treatment of journalists. That show led Turkey to call in Germany’s envoy to provide an explanation, although Germany rejected Turkish protests.

SATIRIST GOES INTO HIDING

Boehmermann, an impish-looking 35-year old, isn’t taking any chances now. Fearful of possible Turkish reprisals, he is reported to be under police protection. His next show on ZDF public television, Neo Magazin Royale, was canceled.

In theory he could even go to prison though few commentators think it likely.

In a country reputedly lacking in humor, German comedy is often viewed as slapstick and crude compared to the more subtle or witty approaches taken by British comics.

Award-winning Boehmermann, known for being provocative, is a niche player even in Germany. He sowed confusion among media last year with a manipulated video of then Greek finance minister Yanis Varoufakis showing his middle finger, known as the “Stinkefinger” in German, to Berlin, over the debt crisis.

In contrast to more politically correct attitudes prevailing in the United States and Britain, German media tend to embrace their editorial freedoms wholeheartedly.

A decade ago, German newspapers published Danish cartoons lampooning the Prophet Mohammed that led to big protests in the Muslim world, and also printed covers of France’s satirical Charlie Hebdo magazine after Islamists shot dead its cartoonists in January 2015.

Satirist Martin Sonneborn, a member of the European Parliament and former editor of Titanic, a German satirical magazine, defended Boehmermann.

“It is a funny reaction from the madman of the Bosphorus as we fondly call him in the European Parliament,” Sonneborn told n-tv, adding that much was at stake in the dispute, not least as many Germans were opposed to Merkel’s policies towards Turkey.

Merkel pushed her EU partners to enlist Turkey’s help in halting an influx of migrants into Europe in return for political and financial benefits for Ankara, despite what many EU leaders see as Erdogan’s increasingly authoritarian rule.

Some German politicians have criticized Merkel for becoming too reliant on Turkey as a result of the migration deal.