Ankara (AFP) - A song lampooning Turkish President Recep Tayyip Erdogan that was broadcast on a German public television satirical show has sparked a diplomatic spat between Berlin and Ankara, sources on both sides confirmed Tuesday.

Turkey last week summoned Germany's ambassador to protest the two-minute clip "Erdowie, Erdowo, Erdogan", which ridicules the president, his alleged extravagant spending and crackdown on civil liberties.

The song is set to the tune of German pop star Nena's 1984 love song "Irgendwie, Irgendwo, Irgendwann" (Anyhow, Anywhere, Anytime) and was screened on regional broadcaster NDR's "extra 3" show on March 17.

The German-language lyrics charge, among other things, that "a journalist who writes something that Erdogan doesn't like/ Is tomorrow already in jail".

Speaking on condition of anonymity, a Turkish diplomatic source told AFP: "We summoned the ambassador last week to communicate our protest about the broadcast that we condemned.

"We demanded that the broadcast be removed from the air."

A German diplomatic source confirmed Tuesday that Ambassador Martin Erdmann had held repeated talks with the Turkish foreign ministry over the song.

"In these talks he made clear that the rule of law, judicial independence and the protection of fundamental freedoms, including of the press and of expression, are valuable assets that should be jointly protected," said the German source.

Erdmann had stressed that "in Germany, political satire is covered by the freedom of the press and of expression and the government has neither the need for, nor the option of, taking action."

- Freedom of speech -

Erdogan's government has been accused by critics of authoritarianism and muzzling critical media as well as lawmakers, academics, lawyers and NGOs.

Alluding to the government's military crackdown against the banned Kurdistan Workers' Party (PKK), the song charges about Erdogan: "He hates the Kurds like the plague /And prefers to bomb them rather than the religious brothers from Islamic State."

Story continues

The government vehemently denies that the crackdown targets Turkey's Kurdish minority, saying it is only aimed at wiping out "terrorists".

The satirical show fired back at Ankara on Tuesday, publishing a framed picture of Erdogan on its Twitter feed and declaring him its "Employee of the Month".

The editor-in-chief of NDR television, Andreas Cichowicz, said Turkey's diplomatic protest was "not consistent with our understanding of freedom of the press and freedom of speech".

EU heavyweight Germany sees Turkey as the bloc's main partner in tackling a wave of refugees landing at Europe's borders, with Chancellor Angela Merkel appealing for Ankara's help on the issue.

But Merkel has also said Germany will stick to its values and keep insisting on civil and minority rights in Turkey.

German news weekly Der Spiegel said this month it had to withdraw its Istanbul correspondent and charged that Turkey was violating the freedom of the press.

Several diplomats from EU member states, including the German envoy, last week attended the trial of two journalists facing espionage charges, drawing the ire of Erdogan who accused the diplomats of overstepping their powers.

Using a hugely controversial legal article, almost 2,000 people have been prosecuted for "insulting" Erdogan since the former premier became president in August 2014.