No doubt, Monday, October 10, 2016, will become a key date in Turkey’s diplomatic history. On that day, the country’s President Recep Tayyip Erdoğan and his Russian counterpart, Vladimir Putin, signed an agreement on the Turkish Stream gas pipeline, which will bring Russian gas to Turkey and onward to the EU. In short, the deal represents a tactical advantage to Turkey and a new strategic position for Russia, which will keep dominating gas supplies to the EU.

As is natural, the pro-government media in Turkey are waxing lyrical about the agreement, with one headline saying, “The heart of energy beats in Istanbul.” Signing the deal is not only presented as an achievement for Turkey in the energy field but is also a welcome diplomatic comeback at a time when the country is still reeling from the July 15 attempted coup and suffering from tense relations with its Western partners. Fixing the Turkish-Russian relationship—at least in one sector—brings an end to the November 2015 military incident, in which a Turkish fighter jet shot down a Russian bomber aircraft, and illustrates the relaunching of bilateral cooperation with a large joint project. Russian state-controlled energy company Gazprom will also negotiate an unspecified discount on gas prices with its Turkish counterpart.

However, from a Turkish observer’s standpoint, the October 10 agreement is nothing really new, as a memorandum of understanding was already signed in 2014 between Gazprom and Turkey’s BOTAŞ, but work was halted because of the November 2015 incident. What is more, the deal will become a reality only when the two gas operators make a final decision to invest, which has not yet happened. Over the longer term, and subject to future decisions, Turkey is also reinforcing its position as a gas hub on the EU’s doorstep.

From a Russian perspective, the success is even bigger. Russian gas will now be able to bypass what Moscow sees as an unfriendly Ukraine on its way to Western Europe and thus deprive Kyiv of substantial transit revenues: currently, an estimated 40 percent of Russian gas exports to Europe cross Ukraine. By the same token, Russia will preempt potential onshore gas deliveries from Azerbaijan and Iran to Europe—although both countries made positive statements about the Turkish-Russian deal.

In the longer term, Turkish Stream may also displace underwater gas pipelines from Israel and Cyprus to Turkey and the EU. However, a first discussion took place between the Israeli and Turkish energy ministers two days after the Russia-Turkey deal was signed.

More importantly, by building a southern route for its gas exports to the EU, Russia will somewhat weaken a key pillar of the EU’s Energy Union and its Energy Security Strategy, which aim at diversifying supplies away from Russia and avoiding the potential disruption resulting from tensions between Russia and Ukraine. In a way, Turkish Stream is—together with Nord Stream 2, a gas pipeline to link Russia and Germany under the Baltic Sea that is currently in legal trouble due to legal hurdles in Poland—a vehicle for Moscow to eliminate its own dependence on Ukraine and shatter a key EU policy.

From an EU standpoint, as a mirror image, several negative geopolitical aspects will now materialize. Ukraine will have lower strategic importance as a transit country, the EU’s disunity over Nord Stream 2 will play into Moscow’s hands, and there will be little political sense left in the union’s Energy Security Strategy. But not everything is negative: the southeastern EU countries of Austria, Bulgaria, Greece, Italy, and Romania, which had counted on the now-defunct South Stream pipeline from Russia to Bulgaria, will have a real alternative for their gas supplies—assuming the related legalities of connecting various pipelines are resolved.

Beyond the hugely complex intricacies of the gas market, the wider geopolitical aspects will matter immensely.

For one, the Turkish Stream deal will make good sense if the overall relationship between Ankara and Moscow is kept at a decent level in the months and years to come. There are many enduring reasons—from Russia’s annexation of Crimea to the future of the regime of Syrian President Bashar al-Assad, from the fate of the self-proclaimed Islamic State to Russian military support for Syrian Kurdish forces—for the relationship to turn sour at short notice. The region remains extremely volatile, and the two countries do not see eye to eye on quite a number of topics. It might therefore be difficult to implement the gas deal if the political and military relationship regarding Syria were to worsen.

Moreover, the usefulness of Turkish Stream for the EU will depend not only on the completion of connections with Austria to the north and Italy to the west but also very much on the geopolitical atmosphere. The eventuality of growing tensions between Russia and the EU in the near future is more than mere speculation, as frictions could be triggered by multiple factors: continued Russian naval and air harassment of NATO forces in Europe, possibly leading to military incidents; a flare-up of hostilities in eastern Ukraine; new discord between Russia and the Baltic states; and enduring divergences on Syria and the Islamic State and their impact on the work of the UN.

Inevitably, such a political context raises the issue of Russian gas supplies via Ukraine being interrupted. Hence there is an expectation that the situation will be much safer when the Turkish Stream gas pipeline becomes operational. In principle, this is true. Except if Russia uses its rekindled relationship with Turkey to create new trouble for the EU and forces Turkey to take sides in a wider, non-energy-related confrontation.

After all, Russia has accustomed its European interlocutors to a policy of multipronged harassment of anything EU-related (EU agreements with Ukraine and South Caucasus countries, for example) and to direct interaction with those European governments or political parties most visibly at odds with the spirit of European integration. Hungary’s Fidesz and France’s National Front, which are critical of the EU, are cases in point: they benefit from Russian backing and their leaders boast of having positive relationships with the Kremlin.

It is no surprise that Turkey, currently in a position of political weakness after the failed military coup, should enthuse about the Turkish Stream deal, not only for its energy policy virtues, but also for its diplomatic symbolism. From Berlin, Brussels, or Paris, though, the agreement will be watched from a wider perspective than just gas. Western capitals will want to see whether Ankara can maintain its position of a regional power dealing equally with bigger actors such the EU and Russia, or whether Moscow will turn Turkey into a pawn on Putin’s continental chessboard.