Emotions in Turkey have been running high since the failed coup attempt on July 15, and relations with the EU—and the West in general—have suffered. Following a number of diplomatic moves in recent weeks, both partners now seem to have a full work agenda before them. But domestic politics on both sides could interfere with this schedule.

After weeks of lamenting the lack of empathy from European and Western countries in the post-coup period, Turkey has recently received some two dozen prominent politicians and high-level officials from EU institutions and member countries. All have confirmed the EU’s support for Turkey’s legitimate institutions and have focused on topics of mutual interest for the future. A page has been turned, and the European Union has unambiguously reaffirmed its stance on Turkey’s democracy.

On the occasion of these visits, but also during contacts in the margins of the September 4–5 G20 summit in China, a concrete work agenda has emerged. By definition, it corresponds to the priorities on which both sides can agree: modernizing the EU-Turkey Customs Union, implementing the March 2016 refugee deal, continuing work on visa liberalization, cooperating on counterterrorism, and working in concert on foreign policy issues, especially Syria.

Each of these subjects has its own logic and specificity, and each requires frequent technical exchanges as well as strong political commitment.

The customs union, which has been a huge success for both Turkey and the EU, is in dire need of serious revamping to adjust it to evolving trade patterns. By the end of 2016, the European Commission will have completed technical preparations for an upgrade, and the next step will be to agree on a mandate for negotiations with Turkey. This is a very important and concrete move for both sides, with benefits for the economy and for employment.

The EU-Turkey refugee deal works, despite frequent negative remarks from Ankara: in less than six months, €2.239 billion ($2.497 billion) out of an agreed €3 billion ($3.3 billion) of EU assistance has been allocated to Turkey, €652 million ($727 million) has been contracted in full transparency, and €467 million ($521 million) has been spent in line with EU public spending procedures. The agreement will continue to work to the benefit of Syrian refugees in Turkey and to alleviate Ankara’s financial burden. Given the current situation in Turkey, the component of the deal liberalizing visa arrangements for Turkish citizens traveling to the EU might take longer than anticipated to move forward, but work should and will continue.

Brussels and Ankara should further develop their counterterrorism cooperation and deepen their exchanges on Syria’s future, because these areas are critical for the EU as a whole and for a large number of EU member governments.

Another important issue, often absent from the news, is the very large and diversified pipeline of cooperation projects under the EU’s pre-accession program, which helps Turkey’s institutions and policies upgrade to the best standards in all imaginable fields. This process concerns not only technical institutions but also civil society and the cultural-educational sector, and it answers the expectations of many thousands of Turkish entities and citizens. The EU should continue to implement this program with renewed vigor.

However, in the current political context, deeper cooperation on priority topics may well encounter constraints from the two sides’ respective domestic political scenes.

In the EU, the current populist wave and key elections in France and Germany in 2017 may have a dampening effect on some Turkey-related initiatives, although many EU countries and firms have strategic interests in the country.

Similarly, as Turkey goes through post-coup destabilization, heightened economic risks, and exacerbated nationalist sentiments, using a harsh narrative against the EU and the United States seems to have become routine. This type of political discourse risks aggravating even more leading European politicians, deepening the general public’s disinterest in Turkey, and creating additional difficulties (beyond the security situation) for companies doing business in Turkey.

As for Turkey, the country’s stability and prosperity lie on two fundamental pillars that have no real substitutes: NATO and U.S. security; and economic ties with the EU. Despite loud proclamations and eye-catching photo opportunities, developing economic and security relations with Russia, China, or Gulf countries is no easy task for Turkey (with the possible exception of energy cooperation with Russia). Statistics speak for themselves: the EU is Turkey’s largest export and import partner, absorbing 44 percent of Turkey’s exports in 2014. The EU also accounted for some 75 percent of all foreign direct investment received by Turkey in 2009–2011.

Turkish business and financial circles know full well what their fundamental interests are. In the context of the massive trade, economic, and financial interaction between the EU and Turkey, it is high time to make things work and deliver practical advances. Again, this is no easy task, especially given the large-scale purge of intellectuals, academics, ethnic Kurds, and dissenters after the July 15 coup. While the political leadership may find comfort in an ever more extensive purge, exactly the opposite applies on the economic side: the more discretionary the judicial system and the more muzzled the media, the less comfortable foreign investors, banks, and ratings agencies will feel.

There is now a distinct risk that the Turkish ruling party’s past economic successes will be erased by a series of negative moves. In this respect, the international scene is hugely different from the domestic scene. At home, conspiracy theories abound and may even yield political benefits, while a purge might even prove popular with certain circles. But abroad, the longer fundamental uncertainties prevail and the purge goes on, the more Turkey’s economy and reputation will plummet. Moving from a mediocre rule-of-law environment to the rule of the arbitrary will spell disaster for the country’s economy and citizens. The wide expansion of the post-coup purge is becoming a self-engineered impediment to Turkey’s prosperity and stability.

All politics are local, and Turkey will make its own decisions. But ignoring these political, social, and economic fundamentals would be a tragic mistake. Especially when the EU has so clearly extended a helping hand.