Mosul is an Iraqi city that has been under siege for most of the past 10 years. The latest gains by fighters belonging to the Islamic State of Iraq and the Levant (ISIL) are only a culmination of nearly a decade of persistent brutality and terror which the Iraqi government has been ill-equipped to counter.
Various militant groups have been waging a high-profile war against the Iraqi government in Mosul and other towns in Nineveh with near impunity. During this time, the multi-ethnic fabric of Kurds, Turkmen, Arabs, Assyrians and Yazidis has been torn apart, as the city suffers under the grip of lawlessness and insecurity.
During the US occupation when the US Marines would liberate a town of Islamist militants, there would be a short-lived reprieve until these elements would quickly return. It was a deadly and costly cat-and-mouse game which the US and its Iraqi allies lost.
The situation worsened after 2007 when Sunni tribal fighters known as al-Sahwa brigades, with US military backing and blessing, pushed al-Qaeda forces out of Anbar province. The keyword here is pushed not vanquished, because these extremist elements simply moved elsewhere.
Despite the best of talking-head assurances and punditry in the Green Zone, an international area in Baghdad, al-Qaeda was never defeated in Iraq. Nineveh Province offered a strategic foothold for the group: It provided easy access to Syria and Turkey; it was predominantly Sunni, and Arab-Kurdish tensions could be exploited.
More importantly, al-Qaeda - which had now rebranded itself the Islamic State of Iraq (ISI) - could launch strategic raids back into Anbar as part of an overall strategy to regain control of the province.
|Profile: Islamic State in Iraq and the Levant (ISIL)
The civil war in Syria could not have come at a better time; thanks to Gulf and US bungling of the conflict there, the war against Syrian President Bashar al-Assad provided the best opportunity for ISI's growth and expansion. So much so that one year into the Syrian civil war, ISI added Levant (or Sham, in Arabic) to their moniker indicating that they intended to reach well into Lebanon.
Ironically, between 2011 and 2013, the people of Mosul enjoyed better security conditions, as ISIL fighters were siphoned into the Syrian theatre of operations.
But with each initial victory against Assad, ISIL gained popularity, materiel, funds and most importantly, a parade of young men willing to enlist.
The now-swelling ranks poured back into Iraq, making good use of the insecure borders and returned to their bases in Nineveh and Anbar.
With Prime Minister Nouri al-Maliki's army pinned down in a losing battle in Anbar, it was no surprise then that ISIL would choose to make its move to fully consolidate its control of Mosul.
For years, ISIL has terrorised the people of Mosul, known as Mislawis. Mosque imams who did not toe the line were executed; shops that sold alcohol or western pop culture were firebombed; flyers were sent to homes demanding that men have their women properly clothed; artists were intimidated and threatened, warned to draw landscapes or Islamic motifs only.
Throughout Nineveh, a vicious campaign was launched against the Christian, Yazidi and other minorities. Army barracks were routinely attacked while university staff, judges, government workers and even electric company labourers were assassinated. Civilian deaths have been terrifyingly high.
Heads rolled and ISIL made full use of their social media propaganda machine to disseminate the message that the opposition would be decapitated. Not decapitation, but slaughtering - as in cutting of heads with knives. Hundreds of such videos have been circulating online for years.
Pity the poor Iraqi army recruits - mostly Shia - stationed in Nineveh who have seen captured comrades butchered in front of camera. News that many abandoned their positions this week should not come as a shock.
However, fault must lie with the Baghdad government which has been unable or unwilling to secure Nineveh. The systematic defeat of the US-trained Iraqi army in the face of ISIL fighters coupled with failed policies since the 2010 general elections has created just the right conditions for this kind of collapse of national security.
The Kurdish factor
This is where the Kurds can play a huge role if they plan it right. In the past few years, it was the peshmerga or Kurdish fighters who provided some semblance of security to Mosul and the rest of Nineveh. When the Iraqi army took over the security portfolio, however, matters quickly changed. Arab Sunnis in Mosul trusted the army less than they trusted the Kurds, with whom they have always walked a delicate tightrope of diplomacy and mutual benefit.
|Kulajo: My Heart is Darkened
The Kurds have also made little effort to hide their belief that Mosul could - would - become part of a future independent state. Years ago, powerful Arab tribes threatened an all-out war if Mosul became part of a "Greater Kurdistan".
However, much has changed since then. Many of the influential tribal elders - and their kin - have been targeted by ISIL for "collaborating" with Baghdad. They could see the Kurds as the last, best chance for some semblance of stability in Nineveh.
This could be a boon for the Kurds who have been increasingly in conflict with Baghdad over their claims to sell oil drilled from wells located in the Kurdish autonomous region. The Kurds could push Baghdad for leverage if they commit the powerful, well-trained peshmerga to rid Nineveh and Mosul of ISIL.
But this, too, would be costly. Iraqis have seen the devastation wrought on Falluja in 2004, 2005 and 2014, as government forces tried in vain to dislodge Islamist extremists. They have also seen how many Syrian cities have been wiped out in the same process.
But failure to eradicate ISIL now will have many repercussions. The Baghdad government could itself collapse as powerful politicians rail against Maliki who has consistently failed to secure the capital, let alone the rest of the country.
Continued control of Anbar, and perhaps Mosul, in the long-run could become a de facto partition of the country, and encourage other provinces - think Basra, Kurdistan - to throw in the federal towel and go to it alone. More dangerously, however, an ISIL-controlled Nineveh could put pressure on the oil-rich city of Kirkuk, a multi-ethnic powder keg with a fuse that is just waiting to be lit.
Firas Al-Atraqchi is an Iraqi political analyst and an associate professor of practice at the Journalism and Mass Communication department at the American University of Cairo.
The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial policy.