Putin likely implored Erdogan to back off his threat to shut down the Kirkuk-Ceyhan pipeline. Rosneft, the Russian state oil company, expects the pipeline to be open for business, and Moscow expects revenues from the Kurdistan Regional Government (KRG) as a return on its investment. Without the pipeline, open borders or payments from Baghdad to Erbil, the KRG will go broke, a disaster for the Russian venture.

Erdogan’s position was predictable and blustery, including when he said, “No one has a right to throw our region into the fire,” as Yekaterina Chulkovskaya reports. But Putin sought to dial it down, and instead referred to the Russian Foreign Ministry’s statement, which included the phrase “Moscow respects the national aspirations of the Kurds” and the hope for a “constructive and respectful dialogue, with a view to devising a mutually acceptable formula of coexistence within a single Iraqi state,” as reported by Jasper Mortimer .

Putin, of course, kept up appearances of being in control, but there was no denying the unusual nature of his visit to Ankara on Sept. 28 for consultations with Turkish President Recep Tayyip Erdogan, just three days after the referendum vote.

What the Russian president had not banked on was that Barzani would go ahead with the independence referendum on Sept. 25 against widespread international and regional opposition. The Kremlin, of course, could not support ethnic separatism, and was probably hoping for a last-minute deal with Baghdad to stave off the vote. As the prospects of a postponement collapsed, Barzani likely saw Russia’s investment as a hedge against the nearly unified international opposition to its referendum on independence.

Russian President Vladimir Putin had been banking on Iraqi Kurdistan President Massoud Barzani. Over the past year, Russia has invested over $4 billion in the Kurdistan Region’s energy sector, overtaking the United States as the largest investor. By making such a commitment to northern Iraq, Putin was likely counting on both an eventual energy windfall and another card to play as a regional broker at the expense of the United States. He could count on good, or at least working, relationships with Damascus, Tehran, Ankara, to some extent Baghdad and, with the massive oil and gas venture, Erbil.

Putin may have had some effect on Erdogan, who has threatened economic sanctions, conducted joint exercises with Iraq troops on the border and claims he will now only deal with Iraqi authorities in Baghdad, freezing out the KRG. Two days before Putin’s arrival, Erdogan threatened “to close the oil taps, all [their] revenues will vanish and they will not be able to find food when our trucks stop going to northern Iraq." Following Putin’s visit, the Turkish government seemed to somewhat hedge on that threat, saying it would avoid targeting civilians in whatever retaliatory steps it takes.

Putin may have an ally in the Turkish business community, which is seeking to mitigate the economic costs of any retaliation against the Kurdistan Region, as Mortimer writes. Turkey exported $4.5 billion worth of goods through the Habur border crossing the first six months of this year, Mahmut Bozarslan reports, and Turkish contractors are doing over $5 billion in business annually in Iraqi Kurdistan, Turkey’s second-largest market for contractors after Turkmenistan.

Putin can hardly count on either Erdogan’s restraint or for the Turkish president to defer to economic rationality in making his decision. Turkey’s opposition to the Kurdistan Region’s independence is crystal clear and void of caveats. Indeed, the good relations between Ankara and Erbil over the past decade were more the exception than the rule. The independence referendum has put back into play Kirkuk, where there is a sizable Turkmen population. Ankara is now lined up with Baghdad in seeking to assure that control of the oil-rich area stays with the central government.

But a hard line on the KRG could backfire for Turkey. Fehim Tastekin writes that the Kurdistan Workers Party (PKK), which Turkey considers a terrorist group, could benefit if Barzani is weakened. “Boosted by the Kurdish autonomy drive in northern Syria and its defense of Sinjar’s Yazidis against the Islamic State (IS), the PKK stands a chance of gaining a greater foothold in Iraqi Kurdistan. Existing power balances and traditional politics based on kinship ties prevent the PKK from getting mass popular support, but things may change if sanctions weaken Barzani’s administration. The PKK has been organizing silently in Kirkuk lately, which Ankara must have noted. According to Al-Monitor’s sources in Kirkuk, the PKK’s presence there is no more than 500 people, but the sympathy net might expand in the event of turmoil. Hence, a scenario where the PKK fills a vacuum in the area should be also factored in as a counterweight in the calculations.”

If this were not enough, it is Iran, rather than Turkey, that will be the final arbiter of Putin’s ambitions in Iraq and the region. Like Turkey, Iran will seek to prevent the Iraqi Kurdish model from spreading to its own Kurdish population. Tehran may be ready and willing to commit its Popular Mobilization Units to back Iraqi Prime Minister Haider al-Abadi if he decides to deploy forces to Kirkuk. Such a move by Abadi would be popular among Arab Iraqis and likely stave off the political challenge of former Prime Minister Nouri al-Maliki. Indeed, if events take this course, one might even imagine a state of emergency and a postponement of Iraq’s general elections scheduled for April 2018. It goes without saying that Iran has little interest in supporting Russian efforts to expand Russia's share of the international gas market via Rosneft’s deal with the KRG.

Putin has forged a fragile consensus with Iran and Turkey on cease-fires in Syria, and he can’t afford to lose either Iran or Turkey, or both, and maintain his position. There is no Russian military muscle to flex in Iraq, as it has in Syria, especially compared with the assets of Turkey and Iran there. As we wrote here earlier this summer, the referendum has revealed the limits, rather than the extent, of Barzani’s influence and leverage with Baghdad and the region. If the Kurdistan Region faces hardship or conflict as a result of the referendum, Barzani could be blamed or weakened in the ensuing fallout.

Putin has much at risk, but is not without options, in contemplating his next moves. If he misplays his hand in northern Iraq by banking on a weakened Barzani, he may end up finding himself exposed and on defense in both Syria and Iraq, and at odds with Iran and Turkey — the worst of all worlds. Or he can tactfully shift toward the Iran-Turkey alignment, which is gaining traction and strength, quietly distancing himself from dependence on Barzani while opening discussions with Baghdad to pursue Russia’s energy interests in northern Iraq. As this column observed in August, Putin’s grip on events in Syria increasingly depend on Turkey and especially Iran. “Russia might therefore undertake an outwardly passive and inwardly supportive role that allows the regional parties to take the initiative against the Syrian Kurds or others,” we wrote. The same can be said for his approach to the Iraqi Kurds.