BERLIN - Chancellor Angela Merkel said Thursday that Germany wants to patch up frayed ties with Turkey, but without compromising its democratic principles or accepting "Nazi" jibes from President Recep Tayyip Erdogan.

"As difficult as everything is at the moment, as unacceptable as some things are, it can't be in our security and geopolitical interest that Turkey, a NATO partner after all, grows even more distant from us," she told parliament.

Merkel vowed to "work for German-Turkish relations, on the basis of our values and in all clarity" - stressing that these included the freedoms of speech, the press and assembly.

German and Turkish politicians have feuded for the past week after local German authorities cancelled several campaign events by Turkish ministers in support of an April referendum on creating an executive presidency in Turkey.

Foreign Minister Mevlut Cavusoglu said that about 30 rallies were planned and that Ankara had already "informed German authorities of them all".

Erdogan's ministers are keen to tap into the diaspora in Germany, which includes 1.4 million people eligible to vote in Turkey - the fourth-largest electoral base after Istanbul, Ankara and Izmir.

Although Berlin has insisted that local authorities cancelled the rallies so far for logistical reasons, Turkish officials have repeatedly hit back, with Erdogan angrily comparing such actions to "Nazi practices". Merkel said such rhetoric was "sad and depressing", belittled Holocaust victims and was "so out of place as to be unworthy of serious comment".

On future rallies, she said: "We continue to view such appearances by Turkish government representatives as possible as long as they are duly announced, in a timely manner, and in an open way, so that they can be approved."

Cavusoglu said that Turkey was "not calling the current administration Nazi" but that the recent bans "unavoidably remind us the practices during that (Nazi) period." The row is the latest to plague relations, following spats over a German TV comedian's biting satire targeting Erdogan and, more recently, Ankara's arrest of a journalist with the German daily Die Welt. Merkel vowed that her government would do "everything in its power" to work for the release of the journalist, Deniz Yucel, who is being held on terrorist-propaganda charges.

Germany is home to a large community of Turks who have settled in Europe's biggest economy, the legacy of a "guest worker" ("Gastarbeiter") programme dating to the 1960s and 70s.

Over the past year Germany - which has taken in about one million refugees and migrants since 2015 - has also banked on an EU agreement with Turkey that has sharply reduced the influx of newcomers.

"There are few countries with which we have ties this complicated but also this varied" as with Turkey, said Merkel.

Those ties have been put to the test since last July's failed coup aimed at ousting Erdogan.

Berlin has emerged as a strident critic of Ankara's vast crackdown in the wake of the attempt, which has seen more than 100,000 people arrested, suspended from their jobs or sacked for alleged links to the plotters or to Kurdish militants.

Ankara has in turn accused Berlin of harbouring "terrorists" and failing to respond to requests to hand over suspects from the coup as well as Kurdish militants who it believes are members of the outlawed PKK group.

"Mrs Merkel is right, we have profound disagreements on some issues. For example the fight against terror," Turkey's presidential spokesman Ibrahim Kalin said Thursday.

The attempt to further boost Erdogan's powers with the referendum has also alarmed his critics at home and abroad.

German parliamentary speaker Norbert Lammert warned that it could pave the way for "an increasingly autocratic state that is growing more removed from European values and standards".

Elsewhere in Europe, Austrian Chancellor Christian Kern has called for an EU ban on Turkish politicians campaigning for the referendum or on other issues.

And Zurich authorities said Wednesday that they had asked the Swiss government to cancel a planned rally by Cavusoglu on Sunday because of security concerns.

Kalin, the presidential spokesman, told those countries that "we have a very clear message: don't work in vain, the people will decide, not you."