Turkish President Recep Tayyip Erdogan has arrived in Germany for a visit aimed at reducing tensions between the two Nato allies.

It comes at a time when Turkey’s economic troubles are causing growing concerns and Europe needs Ankara’s support to keep down the flow of migrants.

The trip is Mr Erdogan’s first formal state visit to Germany, which is home to more than three million people with Turkish roots.

But the increasingly authoritarian leader is viewed with suspicion across the political spectrum in Germany, which has had difficult relations with Ankara in recent years.

Turkey's president Recep Tayyip Erdogan and his wife Emine arrive in Germany
Turkey’s president Recep Tayyip Erdogan and his wife Emine arrive in Germany (Bernd von Jutrczenka/dpa via AP)

They escalated in the past year to the point where Mr Erdogan called Germany’s mainstream parties “enemies of Turkey” and accused German officials of acting like Nazis, prompting Chancellor Angela Merkel to condemn the Turkish president’s words.

At the same time, the two countries recognise mutual strategic interests and the two leaders appeared prepared to bury the hatchet ahead of the trip, which runs until Saturday.

“Turkey is an important partner for us and it is also an important partner for Europe,” Mrs Merkel’s spokesman Steffen Seibert said.

“We have a fundamental interest … in an economically and politically stable Turkey, and of course in a Turkey in which democracy is practised,” Mr Seibert added.

He said that talks with Mr Erdogan will address both “common interests” and difficult issues.

In an opinion piece in the Frankfurter Allgemeine Zeitung newspaper, Mr Erdogan said it was time to “set aside our differences of opinion and concentrate on our joint interests”.

“Turkey’s hope is to develop relations with Germany and other nations as equals on the basis of mutual respect,” he wrote.

Mrs Merkel championed a 2016 agreement with Turkey designed to halt the flow of refugees and migrants into Europe, which has held up even as relations between Ankara and the European Union soured.

And Berlin considers Turkey an important partner in trying to end the conflict in neighbouring Syria.

People wait for the arrival of Turkey's president Recep Tayyip Erdogan close to a hotel in Berlin
People wait for the arrival of Turkey’s president near a hotel in Berlin (Michael Sohn/AP)

But there has been a series of setbacks to bilateral ties.

Among the irritants has been a 2016 German parliament resolution labelling the early 20th century killing of Armenians in Turkey as “genocide”.

Turkish officials’ attempts to rally support among their citizens living in Germany last year in a referendum over whether to expand Mr Erdogan’s power caused widespread irritation, and several of their public events were cancelled – prompting the Nazi jibes from Mr Erdogan.

Most damaging was the jailing of Germans amid mass arrests and firings by Turkish authorities following a July 2016 coup attempt.

Germany’s foreign ministry says 35 were imprisoned on what Berlin considers political grounds.

While the most prominent – including two journalists – have been released, five remain in Turkish custody.

In recent months, officials in both countries have sought to thaw relations – particularly on the economic front, something that has gained urgency as Turkey grapples with a currency crisis heightened by tensions with the US over the case of a detained American pastor.

While Berlin has said the question of German aid for Turkey “does not currently arise” and emphasised the need for Turkey’s bank to be independent, it has made clear that it does not want an economic basket case on Europe’s doorstep.

Mr Erdogan landed in Berlin on Thursday but has the bulk of his public engagements on Friday, when he will meet Mrs Merkel and attend a state banquet hosted by President Frank-Walter Steinmeier – an event that many German opposition politicians are refusing to attend.

Demonstrations against the Turkish leader are expected in both Berlin and Cologne, and Amnesty International called for Mrs Merkel to use her meetings with Mr Erdogan to address the “dramatic human rights situation in Turkey”.

“In such a situation, a state visit must be used to advocate clearly for all arbitrarily and innocently imprisoned people,” the organisation said.

Police in Berlin shut down a large area around the chancellery where Mrs Merkel was to meet with Mr Erdogan, including the airspace and boat traffic on the Spree river.