Peter Beaumont, The Observer

The details were barely reported at the time by the world's media: the killing on 21 December in the west of Iraq's Sunni-dominated Anbar province of 24 Iraqi army personnel, including the commander of the 7th Division.

According to one account, the men were killed by a massive roadside bomb while chasing al-Qaida fighters. A second version said the soldiers were in the town of Rutba when three men detonated suicide belts among them.

It is what happened next that is crucial. Twenty-four hours later, Iraq's prime minister, Nouri al-Maliki, announced a new operation against the mounting threat posed by jihadi militants. In a moment of political opportunism before elections in Iraq in April, Maliki could not resist dangerously conjoining two issues. As he made a speech a day after the attack, it was not only al-Qaida camps in the western desert that he had in mind, but the year-long Sunni protest movement centred in the towns of Ramadi and Falluja, in Anbar province. The protest camp in Ramadi was, Maliki averred, an al-Qaida headquarters.

The inevitable attack on that camp that followed his speech triggered a cascade of events in a country where for a year now, political competition that has preyed on sectarian interests has been exacerbated by the war in Syria next door.

In doing so it has thrust to center stage once again the town of Falluja, earliest cradle of Iraq's insurgency after the US-led occupation when, in 2003, residents began arming themselves against American forces. This time, in the immediate aftermath of the assault on the Ramadi protest camp, Falluja was seized by al-Qaida fighters.

If the latest conflict over Falluja – the target of two brutal assaults by US forces – has a wider significance, it is because the events in Anbar over the past year are a microcosm of the regional emergence of the Islamic State of Iraq and the Levant (Isis), the al-Qaida affiliate led by Iraqi-born Sunni fundamentalist Abu Bakr al-Baghdadi.

On paper at least, Baghdadi's group has been the most successful of the al-Qaida affiliates. Until a rebel counter-offensive against it at Christmas, triggered by the murder of a physician and fighter in its custody, it controlled whole towns in Syria and had claimed its first major suicide bombing, in a Shia suburb of Beirut. The reported capture of Falluja and Ramadi in Iraq last week added to the group's mystique and reputation.

Paradoxically, however, Isis's recent successes have underlined not its strength but rather its structural weaknesses, as once again an al-Qaida franchise has attempted to impose its own austere and brutal caliphate in captured territory.

And it is in Falluja's bloody history that lie indicators of its probable future, and the fate of Isis across the region.

Even before the first battle of Falluja – the US marine-led assault on the city in April 2004 following the murder of four US contractors – the "city of mosques" concealed complex realities under the banner of "resistance" to US occupation.

When I first visited the city a decade ago, in the immediate aftermath of the fall of Saddam Hussein, I found a conservative but hospitable place. Western journalists could work there independently. Within a year, however, its jumble of metal shops would be making bombs, the first generation of largely nationalist and tribal insurgents already being replaced by a more dangerous group of jihadi fighters.

In truth, this ancient city on a bend of the Euphrates has long bridled at outsiders. Under the Ottoman Turks Falluja was developed as an administrative center to control the powerful Dulaimi tribe, and it was here in 1920 that the explorer and British colonial official Gerard Leachman was murdered.

By the time of Saddam Hussein, this city, 50 miles from Baghdad, had become, along with other locations in what US officials would later call the Sunni Triangle, an important center of Saddam's Sunni-dominated Baathist regime, providing a disproportionate number of security personnel and other officials. Even then its tribal leaders could be restive, forcing Saddam – more than once – to buy their loyalty.

What is now largely forgotten is that it was not inevitable that Falluja would become associated with violence. It was largely untouched by the 2003 invasion and the wave of looting that convulsed Iraq immediately afterwards, and the first American troops to enter Falluja found a local defense force in place and a mayor willing to work with them.

All of that changed on 28 April 2003, when US paratroopers fired indiscriminately into a noisy demonstration outside a school they were occupying, killing 17 civilians. A year later, in the aftermath of the first battle of Falluja, the Coalition Provisional Authority would issue its infamous de-Baathification order, throwing tens of thousands of Sunnis who had once worked for the regime out of work, and effectively excluding them from the political process.

The consequences of those two acts cast a very long shadow, one that persisted even beyond the withdrawal of US combat troops.

The reality is that, despite its depiction at the time by America, armed opposition to the US occupation was never a simple affair. Even as the insurgency grew in size and pace, it was defined by competition and changing allegiances between groups – Baath nationalists against the first jihadis, who would become al-Qaida in Iraq (AQI), which a decade later would later morph into Isis, and which has at various times included a large contingent of international fighters – and between local leaders vying for prominence, not least in the Buessa tribe.

Through the rise of al-Qaida in Iraq to the second battle of Falluja and the emergence of the Sunni Awakening Movement – which began in 2006 and saw substantial numbers of tribal fighters turn against al-Qaida and join forces with the US – those tensions persisted. As Brian Fishman, director of research at the Combating Terrorism Center at the US's West Point military academy, noted in November, when comparing al-Qaida in Iraq in the previous decade and its rebranded version in Syria (and now again in Iraq), the militant group originally foundered for reasons that remain valid.

"The determination to build an Islamic state," he wrote before the latest upsurge in violence in both Iraq and Syria, "put AQI out of step with many Iraqi Sunnis, who felt a sense of nationalism even as they were isolated from governing institutions. AQI's attempts to impose draconian social policies on a population unaccustomed to them alienated AQI from their would-be constituency, and that led the group to spend as much time fighting potential allies as it did trying to overthrow the Shia-led government. AQI's strategy aimed to provoke a Shia backlash against Sunnis that AQI would rebuke, thereby winning the hearts and minds of that constituency. Yet attempting to establish a jihadist state in a majority Shia country by challenging the existing tribal social framework was a course fraught with risk from the start."

For those of us who covered the birth of the insurgency in Iraq, the events of the past year have prompted a striking sense of déjà vu.

The Anbar protest movement that began a year ago in Falluja and Ramadi was fueled by discontent that has stark parallels with that inflamed by the de-Baathification order of 2004. Politically marginalized, targeted often indiscriminately under Iraqi anti-terror laws and with little recourse in a corrupt judicial system weighted against them, what had begun as a legitimate civil rights movement became more dangerous in the face of the Iraqi prime minister's refusal to negotiate.

Visiting Baghdad last March, both Sunni and Shia politicians were warning that, lacking the opportunity for a proper political dialogue, young Sunnis from the protest movement were drifting into the arms of the al-Qaida affiliate, disillusioned, even then, by the failure to make progress.

It was a situation made even more combustible by the war in neighboring Syria, in which Isis had emerged as a major player and exacerbated sectarian tensions.

If Fishman appears to have been wrong about one thing, however, it was in his prediction that Isis – under Baghdadi – had learned from the mistakes of al-Qaida under Iraq's former emir, Abu Musab al-Zarqawi, who was killed in a US air strike in 2006 and who was Baghdadi's mentor. The reality, as had become clear in both Syria and Iraq, is that Baghdadi's al-Qaida in Iraq, rebranded as Isis in April last year as he vowed to declare war on the governments of both countries, had not changed its spots.

In Syria its secret prisons, sharia courts, executions and assassinations of other rebels have provoked the recent powerful backlash. In Iraq, too, there are indications that the same Sunni forces that once coalesced to combat the first incarnation of al-Qaida in Iraq are gathering again.

Given the history of Baghdadi, none of this should be surprising. Born in 1971 into a religious family in the city of Samarra, Baghdadi earned a doctorate in education from the University of Baghdad. After the US invasion in 2003 he was quickly drawn into the emerging al-Qaida under Zarqawi, getting involved first in smuggling foreign fighters into Iraq, then later as the "emir" of Rawa, a town near the Syrian border. There, presiding over his own sharia court, he gained a reputation for brutality, publicly executing those suspected of aiding the US-led coalition forces.

In his rise to the leadership of al-Qaida in Iraq in 2010 – and later of Isis – he killed prominent Sunnis as well as Shia civilians in bombings, announcing unilaterally last year the creation of his new group and that it would be merging with the rival al-Qaida affiliate active in Syria, Jabhat al-Nusra. This pronouncement was disputed by Jabhat, which appealed to al-Qaida Central's leader, Ayman al-Zawahiri, who ruled against Baghdadi.

It was an act of hubris in keeping with his group's ambitions and history of overreaching itself. In Syria, other rebels have complained, Isis appeared more interested in consolidating its rule over captured towns as part of Baghdadi's plan to establish his own caliphate. Facing pressure there, some analysts believe he may have made a fatal tactical mistake: moving fighters back across the border to Ramadi and Falluja, spreading his group's forces ever more thinly.

Toby Dodge, an expert on Iraq at the London School of Economics, believes like a number of others that Baghdadi and Isis have once again seriously overreached themselves.

"They are both opportunistic and hubristic," he said. "When al-Qaida in Iraq first emerged, there was no Iraqi army or state, and no proper politics. Now 933,000 men are under arms. If Maliki decides to move against them in Anbar, it won't last long."

Dodge argues, too, that the re-emergence of al-Qaida in Anbar has been fueled by multiple issues: a four-way power struggle in the province, the failure of Sunni politicians to benefit from contesting elections in 2010, and Maliki's crushing of the protest camps on at least three separate occasions.

"They have also been more successful in Falluja – especially its suburbs – for historic reasons. Falluja is still deeply traumatized and, unlike Ramadi, has no social structures to rebuff al-Qaida.

"But Maliki may feel it is more in his interest to let this play out until April and the elections then say to Shias in the south – you may not like me, but I am the hard man who can deal with this threat."

Dodge also disputes the Iraqi government's narrative that it is Syria that has been destabilizing Iraq. "It is Iraq which is still the net exporter of violence and extremism," he says.

All of which suggests that the long agony of Falluja is far from over. © Guardian News and Media 2014