Upon a small card table set in the mud, on ground once controlled by the Islamic State, an Iraqi Army colonel unrolls his well-worn map of central and eastern Iraq.

Methodically he points out how the Army has worked in concert in recent months with Kurdish peshmerga units and Shiite militias to flush IS out of most of Diyala Province, northeast of Baghdad.

As a dozen bulldozers and graders roar in the background – building a new road for military traffic to the shrine city of Samarra – Col. Saad Mirwah says his joint command has successfully checked the advance of IS since June, when it advanced from Syria and captured Iraq’s second-largest city of Mosul. Several Iraqi divisions disintegrated during that offensive.

“When the Iraqi Army collapsed and Mosul fell, our morale was down. Now the same thing is happening to IS in Diyala,” says Colonel Mirwah. “The secret of success here is cooperation with each other."

Diyala shows how Iraq’s disparate armed forces and paramilitaries can band together to repel IS, which poses an existential threat to Iraq and menaces its neighbors. But the apparent success of Mirwah’s 5th Division, which he says “stood up” to the IS advance, is not easily replicated elsewhere in Iraq, because it relied upon a conducive blend of armed forces, a unified command, and local help.

Last summer, IS threatened to march on Baghdad using towns in Diyala as a gateway. That threat has now faded. But Diyala is still a crucial crossroads in the conflict, because of its mixed Shiite-Sunni character, and because IS trumpeted its importance to gaining more ground in Iraq.

Since June, Iran has sent hundreds of military advisers, along with large supplies of weapons that have helped shift the balance in Diyala. Likewise, Washington last month authorized a near-doubling of US military advisers in Iraq to 3,100, tasked with forging a leaner and battle-ready Iraqi Army.

Mirwah says Army units and Shiite militia have made their battlefield gains under the command of Hadi al-Amiri, leader of the pro-Iranian Badr Organization; Kurdish units that have their own command structure also “listen” to him.

Still, there is little desire in Sunni areas like Anbar Province for the intervention of Kurdish units or Iran-backed Shiite militias, which worked so effectively together in Diyala but are viewed with deep suspicion by Iraqi Sunnis. In Anbar, IS has infiltrated Sunni tribes and slaughtered those that dare to fight back.

Violent reprisals

On Monday, 50 miles north of here in the town of Alam, IS executed 13 Sunni members of the mostly Sunni Al-Jabour tribe it accused of being resistance fighters. In the latest example of IS using social media to intimidate those who oppose it, the men were dressed in orange jumpsuits and forced to kneel, each one with a black-clad executioner carrying a pistol behind him.

“If the government wants to make a victory in Anbar, they need to revitalize the tribes,” says Hisham Alhashimi, a security analyst in Baghdad.

Moreover, Prime Minister Haidar al-Abadi, a Shiite, also needs to fulfill his promises to address long-standing Sunni grievances that have fed the backlash against Baghdad, particularly after the Army violently put down Sunni protests two years ago in Anbar. Right now, says Mr. Alhashimi, “the government is incapable of doing this.”

Officials in Diyala say local Sunni and Shiite civilians alike helped them to turn the tide against IS, and deny allegations of sectarian bloodletting.

“We don’t have any revenge; the Sunnis are not our enemy, our enemy is IS,” says Uday al-Khadran, the mayor of the city of Khalis, who orchestrated the defense of his city with a series of trenches last summer, working with Mirwah and his militia allies.

In October, Amnesty International reported “dozens of cases of abductions and unlawful killings” by Shiite militias against alleged Sunni collaborators with IS. Some of these alleged cases occurred in Diyala. And Reuters reported Wednesday, quoting an Iraqi Army deputy commander in Abu Ghraib, that Iraqi forces and Shiite militias consider the belt of Sunni farmlands around Baghdad a “killing zone” with no civilians, only IS.

In November, photographs appeared in news reports and on Facebook of Shiite fighters at a funeral of one of their fallen in Basra, triumphantly holding up the severed heads of IS fighters in clear plastic bags, and pronouncing that they had got their “revenge” on IS.

Echoes of Al Qaeda in Iraq

Mr. Khadran rejects “claims that [militias] made bad things for people,” but adds that “many” members of IS’s political wing lived in Diyala. And yet one reason so many Sunni civilians have helped local authorities resist the militants is because they remember the presence of jihadists from Al Qaeda in Iraq in their areas in 2007-2008 – often with local support – and they want to avoid a repeat.

So Khadran says local Sunnis helped them identify four booby-trapped houses in one village, and provided a steady flow of information on IS in occupied areas.

“Each area we liberate, we make a committee to return families back,” says Khadran. Families must promise not to cooperate with IS in the future.

The mayor shows photographs on his phone of a feast put on for him and other Shiite officials by local Sunnis last August, and says they prayed together. He got a similar invitation five days ago.

“If we want to cut their heads off, they would not welcome us and give us lunch,” says Khadran. “The breaking of IS in this area is evidence of their losing. The local people gave them no support.”

Officials in Diyala say they have been surprised in recent months at how quickly well-armed IS fighters retreated in the face of advance by concerted, multi-pronged military forces. But as militants pulled back, their sophisticated use of explosives has become apparent.

On the mayor’s phone are photographs of maps of buried explosive devices left behind by IS. In one town along a single stretch of road and side streets, more than 250 devices had been strung together and buried.

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

“We lived in the commander’s house for three days and didn’t know it was full of bombs,” recalls Khadran.

Bomb factories are hidden behind false walls in bedrooms. And when his forces enter a new IS area, says Khadran, the first thing they do is shut down the mobile phone system so explosives can’t be remotely detonated by simply calling a number.