In the wake of the US invasion of Iraq in 2003, Mosul was the model case of how to beat an emerging insurgency. David Petraeus, then commander of the 101st Airborne division, before he later led all US forces in Iraq, was celebrated for a hearts and minds campaign that secured the city while much of the rest of the Sunni Muslim heartland burned.

General Petraeus understood at the time that military means alone could not defeat hardcore remnants of the ousted Saddam Hussein regime so he put people to work and gave locals responsibility for running their affairs.

The peace in Mosul, a mostly Sunni city on the banks of the Tigris some 400km northwest of Baghdad, was shortlived. Mosul was overwhelmed by insurgents again after the now-retired general departed, and it was devastated amid the Sunni-Shia civil war that ravaged Iraq over the next two years.

It was only partly pacified again in the late 2000s, after US forces encouraged Sunni tribes to turn against al-Qaeda militants, who by then made up the largest part of the rebellion.

The fall of Mosul once more into the hands of jihadis– this time militants that even al-Qaeda considers too radical for its taste – is not simply another sorry chapter in the Iraqi saga.

It encapsulates the tragedy that is Iraq today, a failed state whose central government is gradually losing its grip over large parts of its territory more than a decade after the collapse of the Ba’athist regime.

As the al-Qaeda splinter group, the Islamic State of Iraq and the Levant (known by the acronym Isis) marches on, extending its reach further south, the government appears more paralysed than ever.

Security forces that the US spent billions of dollars training and equipping appear to be no match for a much smaller yet far more motivated jihadi force. Politicians in Baghdad, meanwhile, trade blame for the disastrous loss of one of the country’s large cities instead of rushing for ways to contain it.

Some will inevitably blame the turmoil sweeping Iraq on the bungled US occupation of the country. The legacy of American missteps, including the failure to commit enough troops early on while at the same time disbanding Saddam’s army, contributed to the expansion of the insurgency and to the weakness of the post-Ba’athist Iraqi state.

Equally, the turmoil can be seen as part of the spillover from the crisis next door in Syria. Isis is the successor to what was al-Qaeda in Iraq. It gained a new lease of life in the lawlessness that spread after the eruption of a largely Sunni rebellion against the minority Alawite regime of Bashar al-Assad.

Recruits, weapons and funds have flowed in for a new Sunni cause; the jihadi dream of a radical Islamist state across the borders of Iraq and Syria suddenly became possible to achieve.

Yet Iraq could have fought off the jihadi resurgence with more authority, and perhaps overcome the mistakes committed by the US, if it had a credible central government with a national rather than sectarian vision.

The Washington-based Center for Strategic and International Studies described the country’s threats, even before Mosul was seized by jihadis, as “self-inflicted wounds caused by its political leaders”.

The conflict in Syria came at a time of rising tensions between the country’s empowered Shia majority and the Sunni minority. Nouri al-Maliki, the Shia prime minister since 2006 who wants to form yet another government after his bloc won the April parliamentary elections, has infuriated friends and foes with what they see as creeping authoritarianism and rampant government corruption.

Instead of following through with promises made to Sunni tribes that had fought against al-Qaeda, he launched a crackdown that alienated the Sunni community and raised cries of massive human rights abuses. Popular protests were organised across Anbar province last year but they were eventually exploited by radical jihadi elements.

Isis has been in control of the town of Fallujah in Anbar province since January, and it has been looking to expand to other largely Sunni areas of the country.

Mr Maliki has survived because representation of the Shia community is split among several political groups, with similar divisions plaguing Sunni Arabs, while the Kurdish minority is mindful above all of safeguarding its autonomy in the north of the country. He has also maintained US support, in part because he is seen as less beholden to Iran than other Shia groups.

Although a majority of political parties are against the return of Mr Maliki to power, and see him as part of the problem to Iraq’s woes, his coalition won 92 of the 328 seats in parliament, putting him ahead of other blocs. In the power struggle brewing in Baghdad while a bold jihadi assault advances, however, all political players could end up losing.