Judging by the scenes of protesting Crimean Tatars in Ankara and Istanbul, Russian President Vladimir Putin's visit did not elicit warm feelings among many Turks. Yet, he is always a welcome guest for the Turkish state.

A day after Pope Francis visited, the Kremlin's uncrowned emperor rolled into Turkey's capital with as many as 10 of his government ministers, to make two key announcements: First, that the South Stream pipeline, projected to carry natural gas to the EU under the Black Sea, has been abandoned; second, Turkey remains a partner of choice for Russia.

The fate of the multibillion dollar project had been up in the air for a few months. Breaching EU competition rules, the pipeline project could have gone through if it had allowed access to suppliers other than Gazprom. The crisis in Ukraine and the mounting tensions gave EU policymakers an additional reason not to accommodate Russia's demands for special treatment.

As a result, Putin declared that resources will be directed towards upgrading gas pipeline infrastructure linking Russia to Turkey - or even building an altogether new pipeline, in an attempt to save face and offset the losses incurred over South Stream.

Energy interests

This decision underscores the pragmatism in the way Moscow and Ankara deal with each other. Meetings and official phone conversations between Putin and Turkish President Recep Tayyip Erdogan, more than 35 over the past few years, usually follow a very similar script. The two leaders agree to disagree on the ongoing human tragedy in Syria, where they sit on opposing sides, and proceed with bilateral business.

This time around, they made the usual pledge to triple the volume of trade between the two countries from the current figure of $33bn to $100bn by the end of this decade. That might be an ambitious target but one should not forget that Russia is already Turkey's second largest trading partner after Germany. It is, furthermore, the second biggest market for Russian gas exports outside the former Soviet Union, with Germany again the frontrunner.

Turkish construction firms have carved out a niche in the Russian market, benefiting handsomely from large public-funded project such as the Sochi Winter Olympics. This explains why Erdogan was deaf to calls for Turks of Circassian origin to boycott the games, which were set in the part of the Caucasus they were uprooted from back in the 1860s.

But even in business things are not as smooth as they seem. Both Moscow and Ankara came to the table with their respective shopping lists to drive a hard bargain. What Turkey got out of the meeting was a six percent discount on gas traded between Gazprom and its gas oligopolist BOTAS as of January 1, 2015.

Currently, there is a problem with gas deliveries over the Trans-Balkan pipeline to western Turkey via Ukraine, Moldova, Romania and Bulgaria, because of disruptions due to the constant wrangling between Gazprom and Ukraine's Naftohaz. If the winter is harsh, heating in Istanbul and other large cities in the Marmara region will suffer. That is not a welcome prospect for the Turkish government, which is heading for general elections in the first half of 2015 and is therefore determined to avoid such unpleasant shocks and also keep gas prices low.

High-ranking Russian representatives, including Gazprom's CEO Alexei Miller, who was in Ankara last week, promise to step up volumes through the Blue Stream, the pipeline connecting the Russian grid to central Anatolia via the Black Sea, and reach a total of 30 billion cubic metres in 2014, from 25.6 billion cubic metres the previous year. In this context, it makes perfect sense that investment should be redirected from the botched South Stream project to the upgrade of Blue Stream.

In the long run, Ankara would also like to move away from dependence on Russia and tap into new gas flowing from Azerbaijan - via the Trans Anatolian Natural Gas Pipeline (TANAP) coming onstream in 2019 - Northern Iraq, Iran and, should a solution be reached on the Cyprus Issue, the Eastern Mediterranean. The AKP government has helped decrease imports from Russia to 57 percent of the overall volume, but in absolute terms, consumption in an expanding economy like Turkey's is only going higher. Luckily, the plummeting prices of oil have come as a huge bonus to the government, reducing Turkey's bill and improving the balance of payments vis-a-vis Russia.

Strategic value of partnership

What Turkey is offering in exchange is neutrality in Putin's confrontation with the West. Ankara has a lot of reasons to be unhappy about the annexation of Crimea, home to a large Tatar community which views Turkey as a kin state, and about the frozen conflict in Eastern Ukraine. Yet, unlike all other members of NATO, it has declined to join the sanctions imposed on Russia (imports of Turkish poultry and seafood have rocketed since).

The strategic value of Turkey's neutrality has only gone up after Putin found himself shouldered aside by most emerging powers at the recent G20 summit in Brisbane, Australia. Russia has long encouraged Turkey's pursuit of an autonomous foreign policy and emancipation from NATO and the US. As the Turkish city of Antalya hosts the next G20 summit, there will be a renewed emphasis on Turkey's transformation into a global leader rather than a pliant western periphery.

But geopolitical gains may not give Russia sufficient incentive to accommodate Turkish demands. Putin came with a delegation of 10 government ministers and a shopping list too. He would like to see progress on Rosatom's $20bn project to build Turkey's first nuclear power station at Akkuyu near Mersin. Construction work is expected to start in May, but reportedly Putin has insisted on a preferential treatment for the Russian state company by the Turkish tax authorities. It seems, however, that Erdogan has held his ground this time around and Rosatom has not obtained what it wanted.

Though Putin's visit will be remembered for the South Stream announcement, what is most remarkable about it is the continued development of Russian-Turkish relations, amid mounting tensions between Putin and the West.

Dr Dimitar Bechev is based at the European Institute, London School of Economics. He writes on Turkey, South East Europe and Russian foreign policy.