German journalist Mesale Tolu smiles during a news conference after she was released from prison last year. An Istanbul court has now lifted a travel ban on her. (Lefteris Pitarakis/AP)

BERLIN — Officially, Europe, the United States and Turkey all consider themselves to be allies, woven together by their NATO membership.

But in reality, all three partners have been at odds with one another since at least last year, with Turkish President Recep Tayyip Erdogan’s increasingly authoritarian rule and President Trump’s confrontational trade policies posing the biggest challenges.

U.S.-Turkish tensions escalated after a deal to free American pastor Andrew Brunson fell apart at the end of July, provoking Trump’s anger and U.S. tariffs that sent the Turkish currency into a downward spiral. Brunson has been held by Turkish officials on terrorism-related charges for two years.

Whereas U.S.-Turkish talks over Brunson’s release appear to be deadlocked, an Istanbul court has now lifted a travel ban on 33-year-old German journalist Mesale Tolu, another prisoner Western countries considered to be held for political reasons. Tolu had mostly worked with left-wing news outlets, and the decision to allow her to leave the country was first made public by a support group Monday. The announcement came as a surprise to observers, but there were other signs that Turkey may be looking for ways to repair damaged ties to Europe that faltered after a 2016 coup attempt, as the United States steps up its pressure.

When Erdogan warned in an op-ed one week ago that “Turkey has alternatives” to the United States, his comments were widely seen as a turn toward China, Russia or Qatar. But they might also have been directed at European leaders.

There are reasons to remain skeptical about whether European hopes of a thaw in European-Turkish ties are justified. Besides Tolu, Turkey still holds seven more German citizens who are considered to be political prisoners by Berlin. The trial of Tolu is expected to proceed in absentia, and her husband, who faces similar charges, was not freed.

Whether Europe is willing to overcome its own objections to Turkey will largely depend on Germany, which has been one of the key Western targets of Erdogan’s anger. The country is home to up to 3 million people with Turkish parents who mostly came there as guest workers and of whom many are still allowed to vote in Turkish elections.

The majority of Turkish-German voters support Erdogan’s governing AKP party, which has dismayed German politicians who feared that Erdogan’s election campaign in Germany could sow discord. Efforts to restrict Erdogan’s sway over the Turkish diaspora population in Europe have disrupted European-Turkish relations to such an extent that Erdogan has accused the German government of “Nazi practices.” The animosity those attacks provoked is unlikely to simply fade away.

But Europe is also aware of the risks of a more confrontational approach. Located between Europe and the Middle East, Turkey has hosted millions of Syrian refugees, largely preventing them from continuing their journey to Europe after a major deal was struck in 2016. And as migration fears have swept a number of far-right parties into government offices across Europe, Erdogan is well aware of Europe’s need for Turkish cooperation. With the Turkish economy faltering, the dependency goes both ways, however.

Erdogan has called the leaders of the two top continental European economies — Germany’s Angela Merkel and France’s Emmanuel Macron — to discuss ways to boost trade and investment ties, according to Turkish summaries.

And in a Trump-weary Europe, there appears to be a growing number of politicians who would prefer more trade over more sanctions.

“The people of Turkey urgently need a very clear signal: Germany and Europe will not participate in Trump’s economic destabilizing of their country,” former German foreign minister Sigmar Gabriel warned in an interview with Germany’s RND news agency published Monday.

Gabriel went on to caution that an isolated Turkey may eventually seek to become a nuclear power. “The United States is far away. But in Europe, we’ll pay a price if Turkey becomes unstable,” Gabriel said.

Germany’s conservative party maintains that Turkey would have to send a clear signal that it is willing to walk back some of its restrictive policies before any possible reset of European-Turkish ties. So far, there are no signs of that. Only days before the travel ban on Tolu was lifted, a 46-year old German citizen was arrested by Turkish authorities on terrorism charges in a separate case.