The spread of Islamic State in Iraq and Syria (Isis) across northern Iraq in 2014 had a galvanising effect on the countrys political factions, providing a common enemy for the establishment to unite against.
The Islamist insurgents inadvertently triggered the downfall of Prime Minister Nouri al-Maliki much maligned for his pro-Shia sectarian policies allowed the formation of a more inclusive national government and appeared to reduce diplomatic tensions between Baghdad and the Kurdistan Regional Government (KRG).
Iraq and its northern Kurdish enclave signed an agreement in November that in theory should have normalised relations, allowing the KRG to export oil under the Iraqi government umbrella in exchange for its share of the national budget.
But in reality, the likelihood of either party keeping its side of the bargain looks slim, and the issue of long-term control over northern Iraqs major oil assets goes unaddressed.
Critics of the Baghdad-Erbil oil agreement say the deal is merely papering over the cracks in a time of crisis. Iraqi Prime Minister Haider al-Abadi has no intention of letting the Kurds control the oil fields around Kirkuk in the long term, but has lost control of the area and must bargain with those in power.
If the influence of Isis diminishes in northern Iraq which could happen after Al-Abadis planned ground assault on Mosul in the coming months old tensions between Baghdad and Erbil are likely to flare up.
KRG President Massoud Barzani feels the presence of his Peshmerga soldiers in Kirkuk is legitimate, as the disputed province was abandoned by Iraqi forces facing the threat of Isis in the summer of 2014.
Barzani has made a series of hawkish statements reported in the Kurdish media implying that he intends to hang on to these areas, with or without the presence of Isis.
While the spread of Isis has forced the countrys sectarian power bases to work together, it has also provided a smokescreen for the Kurds and other players to achieve goals not feasible during peacetime.
Baghdad and Erbil may be united in defeating the Islamist threat, but their respective visions of a post-Isis Iraq cannot be easily reconciled.