Hopes were high in Kurdistan after the historic, if ill-advised, referendum on independence earlier this month. To the question 'Do you want the Kurdistan Region and the Kurdistani areas outside the region's administration to become an independent state?', 92% of respondents voted 'yes'. Turnout was 72%.

The result in itself was not surprising. Kurds in Iraq and throughout the region have longed for self-determination for decades. What was surprising was the insistence of the Kurdistan Regional Government (KRG) leadership on the timing of the referendum, given all of the risks they knew it would entail. Observers and players warned that the referendum would trigger swift retaliation from Ankara, Tehran and Baghdad, including military retaliation; that the Kurds would risk losing control of Kirkuk; that the referendum would sow disunity within the Coalition against the Islamic State; and that the Kurds' allies would not come to their defence should things go pear-shaped.

Sure enough, that is exactly what happened. President Masoud Barzani thought this referendum gambit would give him and his party a much-needed electoral bump and bring Baghdad to the negotiating table. Instead it drew them to the battlefield.

Iraqi government forces and Hashd al-Shaabi militias pushed the Kurdish Peshmerga out of Kirkuk, lowered the Kurdish flag and deposed the KRG-appointed governor. Iraqi government forces not only took control of the oil fields in Kirkuk but oil fields held by the Peshmerga in Nineveh and Diyala as well, with little opposition from Kurdish forces. The Iraqi government, sensing its momentum, has launched a broader operation to retake all of the disputed territories in Kurdish hands. By all accounts, the referendum was a spectacular miscalculation that cost Kurdistan its oil-rich territories and sowed mistrust and disillusionment among the Kurds with their leaders.

This could be chalked up as yet another chapter in the Kurds' long history of bad timing and their perennial inability to overcome the bullying and entrenched geostrategic interests of their neighbours – despite the clear moral argument in sympathy with their right to independence.

But there is another component to this saga that is often overlooked. The Kurds have often been their own worst enemies when it comes to plotting a path for self-determination and independence. Yes, their friends have abandoned them, their enemies steadfast against them and their resources limited. But it has just as often been internal Kurdish infighting, betrayal and double-dealing that has gotten in their way.

Last week, the Kurds surrendered Kirkuk to Baghdad with little resistance. Though fears of protracted civil conflict between fierce Peshmerga fighters and central government forces abounded if Baghdad sent troops, residents of Kirkuk reported that government buildings and party headquarters were almost empty when Iraqi troops came in. Peshmerga fighters barely put up any resistance. According to one resident, 'they sold Kirkuk' – 'they' being the Kurdish leadership. 'This is shame on the Kurdish leaders and most of the Kurdish commanders in Kirkuk. They didn't fire one bullet from their weapons. They should defended Kirkuk, but they didn't', another resident said.

The Kurds lost Kirkuk ultimately not due to overwhelming force by Baghdad, but as a result of division and betrayal among their own leaders. Divisions between the Kurdistan Democratic Party (KDP) and Patriotic Union of Kurdistan (PUK) were growing in the lead-up to the referendum and it is reported that the PUK ordered its Peshmerga forces to stand down after striking a deal with Baghdad and Iran to give up Kirkuk in exchange for some unknown future concession.

This is not the first time PUK-KDP competition got in the way of Kurdish independence. During the 1990s, when northern Iraq was under a no-fly zone and the Kurds were out of reach of Saddam Hussein's government and military, the KDP and PUK proceeded to descend into a civil war instead of consolidating a unified administration. The purported PUK deal with Tehran and Baghdad last week has precedent, and not just within the PUK. During the Kurdish civil conflict in the 1990s, the KDP struck its own deal with Iran. In 1994 it negotiated an agreement that allowed it to conduct strikes against the PUK via Iranian territory. When the PUK later struck its own deal with Iran in 1996, the KDP then propositioned their archenemy Saddam Hussein to help them attack and drive out the PUK from Erbil. The KDP has held the Kurdish capital city ever since.

The 1998 Washington Agreement established formal peace between the two parties. Despite occasional tensions and a byzantine, inefficient governance structure of double ministries run by both PUK and KDP administration, the KRG plodded along. Opportunity struck again in the aftermath of the 2003 Gulf War. The Kurds played their hand skilfully and emerged as kingmakers in the new Iraqi government. The promptly consolidated and formalised their autonomy. It seemed as if the Kurds had learned the lessons from their painful past and would put aside animosity to work towards the greater good of a united and functioning KRG. And to a large extent they prevailed – in the period since 2003, the KRG has made economic, political and diplomatic gains.

But old habits die hard, as this latest episode demonstrates. Corruption and governance problems in Kurdistan remained rife. Kurds were frustrated with the chokehold the major parties had on Kurdish politics and civil society. It paved the way for a reformist Goran movement to gather strong support. But Goran did not have enough sway to break the KDP/PUK chain-link. Instead, the Goran Movement has splintered Iraqi politics further and has itself factionalised. After this latest episode, faith in the KRG leadership has deteriorated even further.

The Kurds may like to say they have no friends but the mountains, but their family has a history of letting them down too.