There's a slow-motion crisis brewing in Iraq — one dramatized by recent events that, over the long term, could make any victory over ISIS illusory.

On January 11, ISIS carried out two suicide bombings in Muqdadiya, a town in Iraq's Diyala province, killing at least 26 people. Retaliation was swift — but it wasn't directed against ISIS.

The targets, instead, were Diyala's Sunni residents. The Shia militias that control much of the province went on what analyst Joel Wing called a "rampage": They killed at least 12 people and demolished, per Wing, "7 mosques, 7 houses, and 36 shops."

"I know the militiaman [name withheld] and others who roam our streets. They are from the area," Abbas, a Sunni resident of Muqdadiya, told Human Rights Watch. "ISIS may have been behind the café bombing, but the attacks on Sunni houses, mosques, and people in our area was the League of the Righteous [militia]."

This isn't an isolated problem. Since Shia militias recaptured most of Diyala from ISIS in 2015, they have dominated the province, with minimal oversight from the Iraqi state. As a result, the ultra-sectarian groups have been free to attack Sunni civilians with impunity, making Diyala a dangerous place for Sunnis (a minority by national standards). Analysts disagree about whether it's an organized campaign of ethnic cleansing, but the effect has been quite clear: Diyala has been depopulated of Sunnis.

And Diyala's problems point to something bigger: While the militias are especially powerful in Diyala, they wield enormous influence throughout Iraq due to their key role in the fight on ISIS. Their influence is doing serious harm to the prospects of Sunni-Shia reconciliation in Iraq — which is the only way to ensure ISIS's long-term defeat.

What's happening in Diyala

Diyala is right in the middle of Iraq, bordering Baghdad on its western side and Iran on the east. Prewar, Diyala was demographically mixed: Sunni Arabs were a slight majority, Shia Arabs made up another third, and the roughly 15 percent remaining were Kurds.

ISIS conquered most of Diyala in June 2014, when it surged from its northern stronghold in Mosul nearly to the gates of Baghdad. The Iraqi army, decimated by mass defections, couldn't retake the province on its own. So the government turned to Shia militiamen: independent military organizations dominated by hard-line Shia that are in large part financed, supported, and directed by Iran.

One of the largest such militias, the Badr Brigades, took the lead in reclaiming Diyala — then-Prime Minister Nouri al-Maliki appointed Badr's leader, Hadi al-Ameri, the province's military governor. Badr and their militia allies secured most of the province by February 2015. With Iraq's central government still reeling from the ISIS onslaught, they emerged as the de facto government in Diyala.

"Diyala is mostly under the control of Hadi Ameri and his Badr," Wing explained in a note to me. Other Shia-extremist militias, like Kata'ib Hezbollah (KH) and the League of the Righteous (Asa'ib Ahl al-Haq, or AAH), have set up shop in Badr-controlled territory.

While the militia move into Diyala may have mostly pushed out ISIS, it's been devastating for Sunni civilians. For one thing, the fighting itself was a disaster: Neither ISIS nor the Shia militias are especially discriminate in their targeting, which led to the destruction of entire towns by mortar fire and RPGs.

And the militias have been quite cruel to Sunni civilians since taking over. The militiamen see the Sunnis as ISIS collaborators and take out their anger at ISIS on the civilian population. While the kind of killing that happened in Muqdadiya in January is an extreme case, militia harassment of Sunnis is common.

"Some [Sunni residents] had their children detained just because they're Sunni and male"

"You just look at the demographic maps, you look at where people are living, and it's obvious they're not living in those areas anymore," Phillip Smyth, a researcher at the University of Maryland, told me. "That's not because they don't want to keep living there — it's because of repeated visits by a police force that's dominated by the Badr Organization. … Some [Sunni residents] had their children detained just because they're Sunni and male."

The twin pincers of war with ISIS and Shia militia governance have forced huge numbers of Sunnis from the province. The war pushed out large numbers of Sunni civilians, and the terrible climate created by militia rule has intimidated many of them from returning and driven an additional, smaller number out.

"It's not like they are running masses out of the province," Kirk Sowell, publisher of the newsletter Inside Iraqi Politics, told me via email. "It is that areas liberated from IS well over a year ago are still only receiving back a small number of [displaced Sunnis]."

This has resulted in a huge drop in the Sunni population. Mohammed Taha al-Hamdun, a spokesperson for a major Iraqi Sunni political movement, told a Kurdish media outlet that "forty percent [of Sunnis] have left due to current security issues and the stationing of Shia militia groups there."

This precise number is very hard to verify, but it's plausible. "That could be," Douglas Ollivant, National Security Council director for Iraq from 2008 to 2009 and current managing partner at Mantid International, said of Hamdun's estimate. He also warned that there isn't a lot of information coming out of the province, so any precise estimation should be treated skeptically.

Regardless, it's undeniable that many Sunnis have fled Diyala — and more continue to leave. "You don't want to downplay what's happening," Ollivant says. "It's a very real problem that the government needs to deal with."

Is this ethnic cleansing?

Badr and its fellow militias aren't openly declaring that they're attempting to rid Diyala of Sunnis. That makes it tricky to figure out whether this spate of violence and harassment is more ad hoc — the inevitable consequence of putting extremist Shia in charge of a Sunni population — or an organized, directed campaign designed to push out even more Sunnis and create a Shia majority.

Ollivant, for his part, thinks claims of ethnic cleansing are overstated. "Is it an attempt to actually cleanse the territory, and turn it into a Shia area? … No, it's not," he says.

Ollivant links the militia violence to ISIS's small but significant remaining presence in the area. ISIS has some strongholds in eastern Diyala, which it uses to launch attacks in the province and even, at times, into Baghdad.

A close examination of militia violence patterns, performed by Wing, shows that the big attacks by Shia militias on Sunni civilians tend to follow in the wake of ISIS attacks. That suggests revenge killings — which are, to be clear, war crimes — but not necessarily organized ethnic cleansing.

"It's tit for tat: You have [ISIS] attacking the Shia militias, and then the Shia militias attacking, in turn, the people who are rightly or wrongly giving them sanction," he explains.

Smyth, the Maryland researcher, sees something even more sinister at work. "When you look at it from a grand strategic arc, it's clear that there are cleansings going on, that certain demographics are trying to be addressed by the Shia militias," Smyth says. "I wouldn't call this an ad hoc campaign."

The logic, according to Smyth, is essentially strategic and political. From the militias' point of view, all Sunni civilians are potential ISIS recruits and collaborators. Driving them out of the area, especially so close to Baghdad, denies the territory to ISIS, thus securing Shia civilians. Moreover, pushing Sunnis from their homes renders them politically impotent, as refugees are hard to organize. This would help Shias, especially political parties affiliated with the militias, cement their control on elements of Iraq's government.

"They are trying to cleanse Diyala, at least partially, to bring the Sunni Arab percent of the population far enough below 50 to ensure the Shia and Kurds can always elect a Shia governor," Sowell tells me.

According to Smyth, they're too smart to admit this openly. Instead, the militias send out dog whistles rather than open calls for cleansing, making it clear that they want Sunnis to leave areas — or else — without actually saying it. "If you look at their social media reports, you'll see areas that you know are Sunni that are completely bombed to hell," Smyth says. In the images are "Shia militiamen holding Shia banners … that does send a broader message to Sunnis who are out there who see this."

The claim of a mass ethnic cleansing campaign is shared by some Iraqi Sunni politicians and media, though it has yet to be echoed by a major international human rights group. Human Rights Watch notes that even Badr leader Ameri has called targeting Sunnis "a crime no different from terrorism."

But the fact that informed observers are even debating this demonstrates just how serious the situation in Diyala is. The Shia militia groups are clearly out of control — and Sunni civilians are paying the price.

The bigger picture: the fight against Iraqi sectarianism

There are things the Iraqi government could do to rein in the militias — namely, reassert security control in Diyala. "They need to reenergize and beef up the police forces there," Ollivant says. "They're asking for help for police trainers everywhere; they know they have a problem."

But, Ollivant says, "there are so many problems." The Iraqi government is consumed by three main tasks: fighting ISIS, rebuilding in territory retaken from ISIS control, and setting a budget (which, in a country with huge oil resources, is incredibly contentious). "They just don't have a lot of energy for anything else," Ollivant says.

Moreover, Iraq's Shia majority and Kurdish minority just don't have a lot of sympathy for Sunni civilians, whom they (like the militias) see as responsible for ISIS's rise. "This is like trying to generate sympathy for the ethnic cleansing of Germans in the wake of the Second World War," Ollivant says.

This is a very big problem. The root cause of ISIS's rise in Iraq was Sunni-Shia tension: Specifically, the Sunnis saw themselves as completely disenfranchised by the Shia-dominated Iraqi state. After protests got them nowhere — in fact, they were viciously repressed by Maliki — some of them backed ISIS's armed insurgency out of desperation, even despite ISIS's extreme ideology.

Today, ISIS's extremism has turned off a lot Sunnis. The group is steadily losing ground in Iraq, having lost something like 40 percent of its territory there since its 2014 peak. Iraq's current prime minister, Haider al-Abadi, is a moderate Shia who understands the need to reach out to the Sunni population and convince them to accept the legitimacy of Iraq's central government.

Abadi's task is made a lot harder by militia rampages. When groups like Badr and AAH slaughter and harass Sunni civilians, to the point where some informed observers worry about ethnic cleansing, then Sunnis don't have much reason to trust the central Shia state. After all, these groups are operating with the permission of the Iraqi government, which still needs their support to finish the fight against ISIS.

But if the militias aren't eventually gotten under control, then any victory against ISIS might end up Pyrrhic. Sunnis will once again come to see the Shia and the central government as their enemy, eventually causing them to take up arms again — under the ISIS banner or some other group.

"We're already creating the next conflict," Smyth says. "If the main players who are crushing [ISIS] are Shia militias — who, mind you, are extremist Shia — you're replacing one radical Islamism with another … and this other radical Islamism was one of the reasons it was so easy for [ISIS] to embed itself in the Sunni population."