Turkish President Recep Tayyip Erdogan has criticised Germany for blocking several rallies there in advance of a referendum in Turkey on expanding his powers as head of state, comparing the decision to Nazi practices.

The remarks came on Sunday, a day after he accused Germany of "aiding and harbouring terror" for allowing outlawed Kurdish leaders to hold regular public meetings in the country.

"Your practices are not different from the Nazi practices of the past," Erdogan said on Sunday in Istanbul at a campaign for the referendum.

"I thought it's been a long time since Germany left [Nazi practices]. We are mistaken."

Several German towns prevented appearances by Erdogan's ministers last week, citing security and safety concerns.

Turkey summoned the German ambassador to the foreign ministry in Ankara to lodge a protest after local authorities in the southwestern German town of Gaggenau cancelled a talk by Bekir Bozdag, Turkey's justice minister.

The talk was reportedly intended to promote a "yes" vote for constitutional changes in the upcoming referendum.

Authorities in Cologne also withdrew permission for rallies where Nihat Zeybekci, Turkey's economy minister, was due to speak.

German Chancellor Angela Merkel rejected Turkey's accusations that her government had a hand in scrapping the rallies, saying the decisions were "taken by municipalities, and as a matter of principle, we apply freedom of expression in Germany".

The cancellations have angered the Turkish government, which has accused Germany of working against the "Yes" campaign in the referendum.

Journalist detained

In his comments on Sunday, Erdogan said: "You will lecture us about democracy and then you will not let this country's ministers speak there."

The previous day, Erdogan said Deniz Yucel, a correspondent for Germany's Die Welt newspaper who is in detention in Turkey, was a "German agent" and a "representative" of the banned Kurdish rebel group, PKK.

Yucel, who has both Turkish and German citizenship, was detained on February 14 after his reports about a hacker attack on the email account of Turkey's energy minister, according to Die Welt.

THE LISTENING POST: Turkey's post-coup media crackdown (25:00)

Erdogan accused Germany of harbouring Yucel for a month at the German consulate in Istanbul before agreeing to hand him over to authorities.

He was charged with spreading "terrorist propaganda" on Monday.

Merkel on Saturday called Binali Yildirim, Turkey's prime minister, to try to defuse the dispute and the two countries' foreign ministers are set to meet later this week.