Erdogan's comments, published on Wednesday, came after he was denied permission to address members of Germany's large Turkish community at a rally.

"What kind of mentality is that? That's very ugly. I have never seen anything like that. Germany is committing suicide. That's a political suicide," Erdogan said in an interview with the weekly German news magazine Die Zeit.

"Germany must correct this error," Erdogan added, arguing that he "could not be silenced."

The Turkish president is expected to address the issue when he meets Merkel on Thursday, ahead of the G20 summit in Hamburg. Erdogan had hoped to use his visit to Germany as an opportunity to address German Turks directly with an appearance in the city of Dortmund.

Strained relationship

Relations between the two countries have turned sour, in particular since Turkey's mass crackdown on opposition voices since a failed coup last July. Ahead of a referendum that sanctioned an increase in powers for the Turkish government, Germany and the Netherlands both refused permission for public rallies for a number of Turkish politicians. At the time, Erdogan claimed Germany's behavior was "Nazi-like."

Erdogan added to his criticism of Germany, saying that Turkey would view the country as a land that protected terrorists as long as it did not extradite supporters of the US-based cleric Fethullah Gulen. Ankara has blamed Gulen for orchestrating the coup attempt.

No problem with Merkel

The Turkish president did, however, strike something of a conciliatory note when he said Germany and Turkey needed each other. He also said that, on a personal level, he did not have a problem with Chancellor Merkel.

Turkey has made arrests across all sections of society in what the government claims is a necessary crackdown

In the interview, Erdogan also said he couldn't understand Berlin's support for Deniz Yucel, a German-Turkish correspondent for the Die Zeit newspaper, who has been detained in Turkey for more than 140 days on suspicion of terrorism-related activities.

Germany has said Yucel is being held without justification, with Merkel saying Germany would do "everything in its power" to have him freed. "That Frau Merkel would ever bring the rescue of a terror suspect to the agenda is something that, for me, was very, very strange," Erdogan said.

In another example of deteriorating relations, Germany has also said it will pull troops from Turkey's Incirlik air base after Turkey refused to allow German lawmakers to visit troops there.

Merkel has also ruled out the possibility of any participation on German soil in a Turkish referendum on reintroducing the death penalty. The chancellor said it would not be possible for some 1.4 million Turkish voters living in Germany to take part in such a vote.