Turkey's Recep Tayyip Erdogan told CNN's Christiane Amanpour he was open to criticism.

Story highlights

German law prohibits insulting representatives of foreign countries

Angela Merkel: German government will examine Turkey's complaint closely

Investigation comes as Germany seeks Turkey's help stemming migrant crisis

(CNN) —  

Perhaps it seemed funny at the time. But just how funny is it to have the President of Turkey lodge a criminal complaint against you? And looking at the possibility of three years in prison might not be all that hilarious.

But that is life these days for a German comedian named Jan Boehmermann.

Boehmermann, host of the show “Neo Magazin Royale” on the German public TV station ZDF, read on the air a sexually crude poem that referred, jokingly, to Turkish President Recep Tayyip Erdogan.

The Turkish Embassy, unamused, initiated legal action last week against the comedian, saying he had violated Germany’s law prohibiting insulting representatives of foreign countries.

Boehmermann faces a maximum sentence of three years in prison.

Not the first time Erdogan has taken offense

And this week, Erdogan – a proud man not known for his self-deprecating humor – joined the fray, lodging a criminal complaint against Boehmermann, calling the poem an “insult.”

The prosecutor in Mainz, Germany, opened an investigation last week into whether Boehmermann violated the law.

It’s not the first time Erdogan has taken offense. More than 1,800 criminal cases have been opened in Turkey for insulting the President since he came to power in 2014, according to the country’s justice minister. A year ago, two cartoonists in Turkey were sentenced to 11 months and 20 days in jail for insulting him with a drawing. The sentence was later reduced to a fine.

German Chancellor Angela Merkel said Tuesday that Germany enjoys freedom of opinion, but she said the German government would examine Turkey’s request carefully in the coming days.

The German government would have to give the go-ahead for proceedings against someone who is accused of offending a representative of a foreign state.

Erdogan: ‘We shouldn’t confuse criticism with insult’

The controversy comes just as the European Union – and Germany in particular – is seeking to diminish the waves of migration to Europe, primarily from the Middle East and North Africa. The EU is seeking Turkey’s help in stemming the tide.

At the end of March, when a German satirical song about Erdogan came out, the Turkish President was asked by CNN’s Christiane Amanpour for his reaction.

“We shouldn’t confuse criticism with insult and defamation,” Erdogan said then. “I am, and my people are, open to criticism. I am an open politician and I am an open leader.”

CNN’s Madleen Schröder in Berlin contributed to this report.