Rife with harsh words and resentment, EU-Turkey relations have hit rock bottom. Yet trade and the war in Syria compel both sides to work together on three priorities, none of which will be easy.

The first is to address differing expectations about the EU-Turkey Customs Union. The second: dealing with counterterrorism. The third is about providing humanitarian support to Syrian refugees. To put it bluntly, everything else is peripheral.

The modernization of the Customs Union is illustrative of the EU and Turkey’s problematic relationship, which includes some false expectations. The Customs Union has brought about economic benefits to both partners and has triggered a healthy structural change in Turkey’s manufacturing industry. Businesses on both sides agree that it is time to revamp this one-of-a-kind agreement.

But modernizing the deal will not be a condition-free negotiation, as Ankara seems to expect, for two main reasons. First, an enhanced Customs Union means the full integration of each party’s manufacturing and service industries. This presupposes a level economic playing field—on competition policy, public procurement, trade union law, and economic justice—that is not in place on the Turkish side right now. Second, it is hardly conceivable that EU leaders will green-light the start of Customs Union talks while EU citizens remain jailed in Turkey under spurious charges and without documented indictments.

Ankara’s conspiracy mindset will not spare Turkey from the serious homework it needs to do to in preparation for the negotiations, should they go ahead. Trying to evade a thorough discussion on the legal and regulatory background of a modernized customs union by saying that there is a “German plot” behind the talks will simply not suffice. The extra time needed to form a German government will also inevitably delay forging an EU consensus on whether to launch trade talks with Turkey.

More generally, Turkey needs to realize that its relationship with the EU is now one of resentment after Ankara’s use of acrimonious language toward Europe this year, , including references to “Nazi remnants,” “reigniting the gas chambers,” and telling German voters: “Don’t vote for the enemies of Turkey.”

It would be fundamentally wrong to assume that this is a German fixation. The invocation of “Nazi practices” is as much an insult to all Europeans—including to me, personally—as to the Germans. Millions of European families can tell the same story: how two generations of ancestors suffered death, trauma, and deprivation fighting against Germany in order to save the rest of Europe, while a third (my generation) worked hard to turn the page and construct a united Europe. As long as Ankara fails to acknowledge the quintessential nature of the “never again” motto of the EU project, Turkey will not be seen as a European partner. Short of an (improbable) apology, Europe’s current political resentment will linger.

Yet both sides must find a way to work together, particularly on a second priority: counterterrorism.

With ISIL operations winding down in Syria and Iraq, the fate of its combatants is an issue of immense importance. The mystery surrounding the end of the battle for Raqqa has just been superbly documented by the BBC. Not only does this report raise questions about whether or not the U.S.-led anti-ISIL coalition or the Syrian Democratic Forces entered a deal with ISIL combatants, it also draws attention to how many of them—mere dozens or as many as hundreds—have entered Turkey and how the Turkish security apparatus has dealt with them.

As foreseen, ISIL may now move its fight either to other insurgency theatres, such as Libya or Afghanistan, or bring it back to Europe. The EU’s counterterrorism coordinator has expressed himself clearly on this issue on Turkish public television: Europe will face a terrorist threat, particularly from fighters returning from Syria and Iraq, for a generation. More than ever before, strong counterterrorism cooperation needs to be a central component of the overall relationship between the EU and Turkey. Since counterterrorism policies rest on tracking suspicious individuals on a case-by-case basis, dealing with the nitty-gritty of the problem relies on daily cooperation between police and intelligence services on both sides.

The first question is about how returning European jihadists are tracked by Turkey’s authorities. The second deals with how the information about their travel toward an EU country is fed into the security apparatus of EU member states. Since foreign fighters are often treated as illegal immigrants by Turkey, returning jihadists can elect to go to either their country of nationality or to another of their choice, which poses an additional challenge to EU services.

Hopefully, EU-Turkey counterterrorism cooperation will escape the more general political difficulties between the two partners. Aside from Turkey’s complaints about how individual EU governments fight the Kurdish insurgency movement PKK on their own soil, one simple fact emerges from the present situation: both the EU and Turkey are equally under threat from returning ISIL fighters. Left unchecked, they will be able to take up terrorist activities anywhere in Europe and Turkey.

Regarding the EU-Turkey refugee agreement, despite many criticisms linked to its illegal nature and its immoral character, the March 2016 deal has been implemented at record speed.

As of November 11, projects worth €2.9 billion out of the €3 billion facility have been identified; €1.8 billion has been contracted; and €908 million has disbursed. Looking at the humanitarian aspects alone, the agreement works. Concrete support to Syrian refugees in Turkey and to their host communities now features more frequently in the news and is more visible to the naked eye, such as the forthcoming opening of 178 health centers across Turkey.

Yet, the Turkish state media continues to portray the EU support scheme in negative or restrictive terms. While not new, this persistent dichotomy is particularly striking: on one side, Turkey’s official bodies in charge of implementing the scheme are fully satisfied, diligent, and forthcoming in their frequent meetings with EU counterparts; on the other side, the political leadership keeps blasting EU humanitarian efforts for its own domestic purposes.

This is damaging Turkey’s image in Europe at the very moment that EU leaders are about to discuss whether or not to implement the second €3.0 billion tranche discussed—but not agreed upon—in March 2016 as part of the refugee deal. Whether the forthcoming EU-Turkey discussion will turn out to be another arm-twisting battle or a joint humanitarian endeavor will largely depend on Ankara’s domestic politics.