By 2015, the KRG was feeling the squeeze. As crude oil prices dropped to the lowest level in over a decade, the Iraqi government opted to further punish the Kurds for circumventing Baghdad’s authority with private oil deals, by ordering the closure of the Kirkuk oil pipeline.

During its crackdown, it had also blacklisted the Turkish transportation company responsible for shipping the oil to the international market. Ankara found a quick fix for this: Palmali Group, owned by Turkey-based shipping magnate Murbariz Mansimov, himself conducting secret business with the Erdogan family, took over the operation, reorganised the exports and kept the crude flowing.

Berat Albayrak had resigned as CEO of Çalık by this time and become a prominent member of Erdogan’s party, the AKP. He remained in close contact with his old company, however, as his leaked emails reveal. In August 2015, PowerTrans’s Iraq country manager, Dursun Ali Isguzar, raised concerns that the Kurdish President Masoud Barzani's tenure might soon come to an end: “If Barzani leaves office, the region will be highly affected,” Albayrak’s former colleague wrote. “Trade with Turkey will decline. It is believed that the oil trade will shift to Iran.”

Within three months, Albayrak would be appointed as the country’s energy minister, and Turkey was still on hand to facilitate KRG’s crude sales.

One of Albayrak’s ministry advisors, Tahsin Yazar, explained to him, in March 2016, that the KRG was in serious financial difficulty. Baghdad’s legal actions, he said, left Erbil unable to sell its oil on the open market, meaning it had only a “limited number of buyers”.

These traders, he said, were forced to sign ‘Special Purchase Agreements’, from whom the “KRG receives a hefty lump sum before it [delivers] the petrol.” This had generated over a billion dollars for the Kurds. The Iraqis, however, had squeezed the pipelines, reducing the KRG’s daily oil output by a quarter, from 600k per day to 450k, and therefore unable to deliver the billions worth of oil for which it had already been paid.

“It is rumoured,” Yazar told Albayrak, “that the KRG has debts of $15bn to various circles. And that approx. $3-5bn amount of this is owed to crude petrol buyers”.

Indeed, the Kurds were in financial trouble.

The day after, KRG Minister of Natural Resources, Ashti Hawrami, sent Albayrak - and the Turkish state - an offer. In a document marked ‘Strictly Private and Confidential’, he first explains how the “[Turkish and KRG] cooperation, among other things, has paved the way for KRG’s independent oil exports to the international market”.

The destabilising effects of Baghdad, ISIS attacks and falling oil prices, however, caused “financial difficulties” for the KRG.

Although Ankara had already bailed out the Kurds with loans, he writes, “the KRG now needs further financial assistance from the Turkish Side” to pay its bills. Hawrami asks for 3.74 billion USD. Although he presents several proposals, the KRG’s “preference” is to sell the Turks a significant interest in several Kurdish oil and gas fields - at greatly discounted prices - as well as guaranteeing the Turks will receive a minimum level of financial returns.

The outcome of these discussion is not documented in the leak. Nor did the KRG, Hawrami, or Albiayrak respond to our requests for clarification. Nevertheless, the Turks continued to facilitate the sale of the Kurds’ oil to a small group of traders, even if it has created problems in Baghdad.

A week after KRG President Barzani announced the date for the referendum, in June, an oil tanker carrying over 700,000 barrels of Kurdish crude left the southern Turkish port of Ceyhan - a major oil terminal which links to the Kirkuk pipeline. After a legal complaint from the Iraqi Government, a Canadian court ordered seizure of the oil tanker. Yet, four days after the referendum, another Canadian company announced an oil sales agreement with the KRG.

For now, the oil still flows - and so far Ankara’s sanctions are more talk than action. Though Turkey censored Kurdish TV channels and cancelled direct flights to the Iraqi Kurdish region, the border and the pipeline remain open.

Kurdistan’s rattled neighbour to the north is now trying to walk back years of pre-referendum deals dating as far back as 2011. In hindsight, this cheap oil, negotiated behind closed doors, might be more expensive than Turkey could ever have imagined.