Both the pipeline and the border crossing, however, remain open. And despite Turkish threats it’s hard to imagine how Iraq could begin collecting revenue from Iraqi Kurdish oil sales or that Turkey would benefit from it. As Ben Van Heuvelen, the editor-in-chief of Iraq Oil Report, observed in a series of tweets, Iraq is suing Turkey on the grounds that Turkey violated an existing Iraq-Turkey pipeline treaty and the Iraqi government’s sovereignty. The international arbitration case dates back to 2014, when Turkey allowed the Iraqi Kurds to sell their oil independently of Baghdad through a new pipeline. Van Heuvelen wrote, “Hard to see how Turkey could give back control of Ceyhan exports to [Iraq’s State Organization for Marketing of Oil] without undermining its legal position in arbitration."

Some 550,000 barrels per day of crude, the cash-strapped statelet’s main source of income, are exported via a pipeline that runs to export terminals on the Turkish Mediterranean port of Ceyhan. The Habur border crossing with Turkey is Iraqi Kurdistan’s sole outlet to the West. Habur is used to ferry all manner of supplies that help to keep Iraqi Kurdistan’s fragile economy afloat. Over 2,000 Turkish troops dug in across the northern areas of Iraqi Kurdistan could complicate matters further.

Bostan, whose brother, Mehmet, until recently ran Turkey’s sovereign wealth fund , is known to be plugged into Erdogan’s inner circle, notably with the president’s son-in-law, Energy Minister Berat Albayrak. Thus his claims possibly do reflect Erdogan’s thinking. If so, Barzani may be facing a far bigger challenge than anticipated because Turkey has more immediate leverage than any over Iraqi Kurdistan.

Bostan wrote in his column today, “In a recent phone call between the prime ministers of Turkey and Iraq, the leaders reportedly agreed to cut the [Kurdistan Regional Government's] oil exports and have Baghdad compensate Turkey for its losses. Similar steps have been taken with Iran.” In a further bombshell, Bostan claimed, “Turkish officials, in particular, indicate that canceling the referendum results won’t be enough. Normalization, they argue, cannot take place until Massoud Barzani steps down and is replaced by another politician.”

“ When will Massoud Barzani resign? ” The question posed by pro-government columnist Yahya Bostan in the English-language Daily Sabah suggests that Turkey is cranking up pressure against the Iraqi Kurdistan's president over the referendum on Kurdish independence that was held on Sept. 25 over the objections of Turkey, Baghdad, Iran and the United States.

Pressure through the borders may prove a lower-risk strategy because it can allow Turkey to continue trade with the KRG while reimposing Baghdad’s sovereignty. Washington, according to senior administration officials who spoke to to Al-Monitor on condition that they not be identified by name, is backing a scheme to insert Iraqi customs officials along Turkey and Iran’s respective borders with Iraqi Kurdistan provided it is done peacefully.

A small contingent of Iraqi troops have deployed along both borders and are holding joint drills at the invitation of Iran and Turkey. The Iraqi Kurds have vowed to respond with force should they seek to enter territory under their control. A defiant Barzani, who surveyed peshmerga fighters in the oil-rich province of Kirkuk today, refuses to cave to demands that he annul the referendum. The Iraqi army is plainly no match for the Kurdish peshmerga and in a bizarre precedent, Iraqi customs officials will likely operate out of Turkish and Iranian territory.

In a related development, Rudaw, a leading Iraqi Kurdish news outlet, claimed today that Iran had sealed its borders with the KRG.

The bigger threat to the Iraqi Kurds is Shiite militias loyal to Tehran. Battle-hardened and ruthless, they are said to be itching to go after the peshmerga, particularly in Kirkuk. Should the Shiite militias succumb, it would paradoxically play straight into Barzani’s hands. For one, it would draw the attention of anti-Iran hawks in the White House, who may conclude that the Iraqi Kurds are better partners against Iran than Iraqi Prime Minister Haider al-Abadi and drop their objections to the referendum.

It would also rally the Western public opinion around the Kurds, who have become experts at milking their victimhood.

Predominantly Sunni, the Iraqi Kurds are also seen in Ankara as a bulwark against Shiite encroachment. And until the referendum, Erdogan counted Barzani among his top allies, feting him with the kind of pomp and ceremony reserved for heads of state. But Erdogan is said to be personally affronted by Barzani’s decision to press ahead with the referendum.

Anyone familiar with the mercurial Turkish president knows that he is fiercely loyal to those who stick with him during difficult times. Yet Erdogan is every bit as fiercely vindictive when he feels he’s been let down.

Barzani’s move has triggered nationalist hysteria in Turkey, not least because balloting was also held in Kirkuk, which is home to a large ethnic Turkic minority known as the Turkmens. Since 2015, Erdogan has come to rely heavily on nationalist support. Barzani’s truculence will be pounced upon by Erdogan’s opponents in the run-up to municipal, parliamentary and presidential elections that are due to be held in 2019.

Thus it should come as no surprise that Erdogan called Barzani’s actions a “betrayal.”

But Turkish thinking on Iraqi Kurdish independence transcends Erdogan’s personal ambitions. Until recently, it was widely assumed that Turkey could happily cohabit with an independent Kurdistan. A pliant Kurdish entity would serve as a buffer against the instability engulfing Iraq, help counter Kurdistan Workers Party (PKK) influence and provide cheap energy, especially natural gas. When asked about Kurdish independence Erdogan famously called it "Iraq’s internal matter," saying, "It does not concern us."

The calculus changed when Syrian Kurds with close ties to the PKK seized control over a broad swath of territory bordering Turkey. It has tripled in size since late 2014, when the United States began arming and training the Syrian Kurds and their Arab allies to drive out the Islamic State from Syria. When Turkish officials look at the map, they see the contours of an independent Kurdistan that extends all the way from the Iranian border to the Mediterranean Sea.

In fact, the more Turkey pressures Barzani, the greater the likelihood that he will shelve old rivalries and join forces with the Syrian Kurds. The PKK has already declared that it stands ready to defend the Iraqi Kurds against all attacks.

What began as a nonbinding referendum on independence could balloon into something far bigger than either Barzani or his detractors counted on.