In Mosul, ISIS has lost more than a city. Defeat there marks a reversal of the victory that first put ISIS on the map in June 2014. While the Syrian city of Raqqa is its capital, Mosul was where it declared the state that’s now in full retreat, and the traumatized people of Iraq’s second city can finally begin to rebuild their lives.
Now things will move from bloody to complicated. The conflict has elevated Shi’ite militias to prominence as a potent military and political force, shifting the balance of power away from Prime Minister Haider al-Abadi. His rival, former leader Nouri al-Maliki, will be watching closely to plot new political alliances with ambitious militia leaders.
Kurdish forces also now claim military control of some territories contested by Baghdad, and Kurdish political leaders have seized the moment by calling for an independence referendum. A vote might not be binding, but it would certainly heighten the conflict between the Shi’ite-dominated government in Baghdad and officials of the Kurdistan Regional Government.
Finally, free of ISIS and its war, Sunnis will again demand greater influence, new rights and more resources from Baghdad, intensifying tensions not only between Sunnis and Shi’ites but among Sunni factions as well. Lower oil prices will make it tougher for the government to pay for a long and expensive reconstruction process–and bribes for those who can be bought.
It’s possible that three years of life under ISIS will bring conflict-weary Iraqis of all stripes to seek compromise and build relations. But unfortunately, the nation’s history suggests otherwise.
This appears in the July 24, 2017 issue of TIME.