The Islamic State is finally being forced out of the country, but anarchy is taking over.

Originally published in Foreign Policy by IRIS Director Christine van den Toorn on February 22, 2016.

The liberation of towns from the Islamic State has had the surprising effect on my Iraqi friends of making them more despondent than they were before. When they are asked when things will turn around, they shrug and say Allah karim, akin to the English expression “when pigs fly.” Just after Sinjar was “liberated,” one of my former students from the area sent me pictures of his family’s Friday lunch spread before and after they devoured it, labeling them Sinjar “before liberation” and “after liberation.”

Iraq is now face to face with the classic “day after” dilemma. Many of its towns are demolished, and there is no money to rebuild. There is no agreement on which groups should secure and govern the areas and who gets to go back. The most visceral and volatile barrier is the newfound distrust among the local populations of liberated areas, who see one another as collaborators, bystanders, or victims of the Islamic State. Left unattended, these “day after” dynamics will — and have already — lead to internecine conflict and political gridlock that will undermine battlefield victories, similar to what happened in 2010 when the military successes of the Sunni Sahwa militias, Arabic for “awakening,” against Al Qaeda in Iraq were squandered due to a lack of lasting national and local political deals.

This is evident in Iraq’s disputed post-Islamic State territories, where both the Kurdistan Regional Government in Erbil and the Iraqi federal government in Baghdad feel they have greater claims than ever before. That leaves them even further from local and national political deals that would produce lasting peace. Meanwhile, local forces with varying degrees of loyalty to Baghdad and Erbil have multiplied and militarized.

To see what happens to disputed areas in the absence of a political compact, one need only look to Tuz Khurmatu, a territory in Salahuddin province, whose hinterlands were liberated from the Islamic State in October and November of 2014. Last November, an amalgam of local Turkmen and Shiite militias fighting under the banner of al-Hashd al-Shaabi — on behalf of the national government — began clashing in the town with local Kurds and Peshmerga forces. The “liberated” zone has now become the scene of regular Wild West-style shootings, with rocket-propelled grenade and sniper attacks, kidnappings, theft, and arson a regular occurrence. The fight is not just between Kurds and Turkmen or between Erbil and Baghdad. There is also intra-Shiite and intra-Kurdish militia competition playing out, as Asaib Ahl al-Haq challenges the power of the Badr brigades and Kurdish Salafists challenge the Patriotic Union of Kurdistan (PUK), the dominant local Kurdish party. In the lawless post-Islamic State context, all of these forces feel free to operate openly, with few holds barred.

It is not hard to imagine a similar scene playing out over the coming months in Sinjar, the Yazidi-majority territory in Ninevah province, and other post-Islamic State territories. After Sinjar was liberated from the Islamic State in November 2015, the number of Yazidis leaving Iraq has actually multiplied. It’s not just the utter destruction of their town that has made them increasingly pessimistic about their future in Iraq. It’s also their massive distrust of Kurdish and Arab Muslim neighbors, and the insurmountable political gridlock between competing Yazidi and Kurdish groups.

Specifically, Yazidis have completely lost trust in the Kurdistan Democratic Party since its retreat from Sinjar during the Islamic State’s original offensive on the city. It doesn’t help that the KDP isn’t keen on sharing power; indeed, the KDP had originally sought to be the sole liberator of Sinjar in October in order to better ensure that it eventually became the sole political power there. The KDP’s “my way or the highway” attitude since the town’s liberation has convinced many Yazidis to favor cultivating a relationship with Baghdad over Erbil. It has also given some Yazidi forces, like Hayder Shesho and his Protection Forces of Yazidkhan (HPE), little choice but to demand increased autonomy, as well as to align with Baghdad’s military forces. In the absence of negotiated power-sharing deals between the Yazidis, Kurdish authorities, and the national government, these disputes will almost certainly end in violence, as they have in Tuz.

Over in Diyala province, disputed claims over the areas of Jalawla and Saadiya have complicated and delayed reconstruction and the return of local populations. An informal backroom deal last summer between Kurdish and Iraqi representatives (the PUK and Badr or Hashd, respectively) granted control over Saadiya to Baghdad and Jalawla to Erbil. That led to some stability, and allowed some of the area’s Sunni Arab populations to return. But if the deal is not solidified into a more formal agreement on both national and local levels, there is little doubt that various groups — Shiite militias, Islamic State remnants, anti-Kurdish or anti-Hashd Sunni Arabs — will soon challenge, and shatter, the current order.

The situation, while complex and layered and riddled with competition and distrust, is not hopeless.

It is clear that U.S. policy is for this to not only be an Iraqi war but more importantly an Iraqi peace. This is a correct decision.

We saw what happened when the United States was a key driver behind Sunni forces in 2007 without buy-in from the Shiite parties in Baghdad. Having learned that foreign powers cannot create lasting political deals, the United States rightly now wants locals — Erbil and Baghdad, Yazidis, Sunnis, Kurds — to take the initiative in dealing with each other.

There are many willing partners. In many post-Islamic State territories, there are local actors who are willing to push up their sleeves and take risks to make deals with former enemies (and former friends) to repopulate, reconstruct, rebuild and reconcile. Talib Muhammed, the Sunni Arab subdistrict director of Sleiman Beg in Tuz Khormatu, has met repeatedly with Shiite leadership in Baghdad as well as Kurds in Sulaimani. Hayder Shesho, the leader of Yazidkhan Protection Forces, has been in talks with both the Kurds and with Baghdad. In Rabiaa — not a disputed territory prior to the Islamic State’s arrival – Shaykh Abdullah al-Yawar, of the Sunni Shammar tribe, has made deals with the Kurds, who liberated the area. Other Shammar shaykhs are reaching out to leadership in Baghdad. In Jalawla, Shaykh Yacoub Lheibi, a Sunni Arab PUK member has been leading efforts to return Sunni Arabs to Jalawla under the banner of Erbil.

But local and national actors cannot make lasting deals on their own. There is simply too much distrust, built up over too long a time. If there is to be peace, they will need a third party — be it the United States, the U.N., or USIP — to assist local Yazidis, Kurds and Sunnis who are willing to make deals with one another and with the federal government of Iraq and the Kurdish regional government. In order to be perceived as honest brokers, these outside actors will need to be present on a sustained basis at negotiations on both national and local levels.

The United States and the World Bank should also tie the international aid that the Iraqi government badly needs to the acceptance of the principle of inclusive governance. Last month, during a visit to Iraq, Deputy Secretary of State Tony Blinken announced $38.7 million in additional economic assistance to Iraq, “which will support government reform initiatives as well as post-conflict stabilization efforts,” but there was little mention of who would be responsible for distributing this money in Iraq, and under what guidelines. In mid-December, the World Bank announced a $1.2 billion loan to Iraq, but the conditions attached to it were primarily focused on economic, rather than political, reform.

The United States has done much to enable the military victories in Iraq and Syria. But to prevent that victory from being squandered it needs to do more, in terms of diplomacy and financing, to cement the peace. Washington and other members of the American-led anti-Islamic State coalition need to use their influence to broker a long-term deal between the rival factions and communal groups in post-Islamic State areas.

One big reason the Islamic State moved into Iraq with such ease was the marginalization of local ethnic and sectarian groups by Kurdish authorities in Erbil and national political leaders in Baghdad. If the Islamic State, or its successor, is going to be denied a foothold in the future, this dynamic will need to be remedied. That should be the task for all of the parties that played a role in the recent military triumphs in Iraq, including the United States.