Turkey's President Recep Tayyip Erdogan has lashed out at Germany as tensions flared between the two countries over the cancellation of two Turkish ministers' rallies in German towns, and the ongoing detention in Turkey of a German reporter.

"They need to be put on trial for aiding and harbouring terror," Erdogan said on Friday, criticising German authorities for allowing outlawed Kurdish leaders to hold regular public meetings in Germany, yet this week blocked rallies where Turkish ministers sought to address the Turkish community.

Ankara on Thursday summoned the German ambassador to the country to protest after local authorities in the southwestern German town of Gaggenau axed a talk by Bekir Bozdag, Turkey's justice minister.

The talk was reportedly intended to promote a "yes" vote for constitutional changes in an upcoming referendum that would expand Erdogan's powers.

Cologne authorities have also withdrawn permission for rallies where Turkey's Nihat Zeybekci, economy minister, was due to speak.

German Chancellor Angela Merkel rejected Ankara'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".

Escalating tension

In his speech in Istanbul, Erdogan also said Deniz Yucel, a correspondent for Germany's Die Welt newspaper who is in detention, 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.

Erdogan accused Berlin of harbouring him 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.

Earlier on Friday, reports said that Turkish Foreign Minister Mevlut Cavusoglu spoke to his German counterpart, Sigmar Gabriel, on the phone and agreed to meet in Germany on March 8 to discuss relations between the two countries.