The foreign ministers of Turkey and Germany have agreed to work towards improving relations that have been strained after a period of high tensions.

The apparent bid to restore friendlier ties between the two countries was laid bare on Saturday when Sigmar Gabriel, Germany's foreign minister, hosted his Turkish counterpart, Mevlut Cavusoglu.

Speaking to reporters at the central German city of Goslar, Gabriel said the two top diplomats had been tasked to do "everything we can to overcome the difficulties there have been in German-Turkish relations and to find more common ground in the future".

For his part, Cavusoglu said major differences remained between the two countries, but noted that "as two foreign ministers, we believe we can overcome this through dialogue".

Soured relations

Ankara and Berlin have clashed over numerous issues in recent years, especially after a failed 2016 coup attempt in Turkey.

The tensions rose partly due to the subsequent imprisonment of German journalists and activists by Turkish authorities on "terror" charges as well as Germany's refusal to extradite asylum seekers Turkey alleges were involved in the putsch bid.

Tens of thousands of people have been held and purged in Turkey since the July 15, 2016 coup attempt, prompting condemnation by some EU member states as well as rights groups which accuse the Turkish authorities of using the putsch bid as a pretext to silence opposition.

Turkey, however, insists the moves are aimed at removing supporters of Fethullah Gulen from state institutions and other parts of society. Ankara blames Gulen for the coup bid, a charge which he denies.

Turkish officials have meanwhile accused Germany of harbouring "terrorists", while also expressing frustration over their country's stalled EU membership bid.

In recent weeks, Ankara has released several German citizens on bail following their detention after the failed coup attempt. Among them are Mesale Tolu, a journalist with the ETHA news agency, and human rights activist Peter Steudtner.

Gabriel said he had discussed the arrest of Deniz Yucel, a prominent German-Turkish journalist who has been jailed in Turkey pending trial on charges of spreading propaganda for the outlawed Kurdistan Workers Party.

He did not offer additional details.

'They need each other'

Al Jazeera's Dominic Kane, reporting from Berlin, said the two ministers sought to stress areas of agreement, including a 2015 EU-Turkey deal aimed at reducing the flow of refugees into Europe, while avoiding thorny issues during Saturday's meeting.

"The point here is that the two countries need each other," he said.

"From the German perspective, the deal made between Turkey and the EU is one that must succeed. Likewise, Germany is an important country for Turkey, given that there are millions of people living in Germany who are of Turkish descent."

Germany, home to a three-million ethnic Turks, is also Turkey's biggest trade partner.

Before his visit to Germany, Cavusoglu called for a "fresh start" based on friendship and cooperation between "equal partners".