True victory in the battle of Mosul, the Islamic State’s capital in Iraq and the largest city it controls, will be difficult. Far harder than the military fight will be the political struggle, writes Dan Byman. This post originally appeared on Lawfare .

True victory in the battle of Mosul, the Islamic State’s capital in Iraq and the largest city it controls, will be difficult. It may take months or only a few short weeks, but I expect the Iraqi military, Kurdish Peshmerga, and other various militias—along with the U.S. forces that support them—to defeat the Islamic State defenders and liberate one of Iraq’s largest cities from their brutal rule. Far harder will be the political struggle. Iraqi forces need to maintain their unity as they go forward and a broader political settlement must be forged. Here the prognosis looks poor.

As always in Iraq, the political is harder than the military. In 2003, U.S. forces overthrow Saddam Hussein’s government with relative ease. Much harder but still temporarily successful was the counterinsurgency campaign that accompanied the 2007 “surge” in forces. In both these cases, the United States was not able to put in place a political settlement that would keep the peace. In 2016, with fewer forces and a more troubled region, success will be even further off.

The military challenges in the Mosul operation are considerable. (The New York Timeshas produced a useful graphic of how the fighting may commence.) Although the U.S. military estimates that there are only between 3,000 and 4,500 Islamic State fighters in Mosul, compared with tens of thousands of members of the coalition forces—and that excludes the advantage of U.S. airpower—the defenders enjoy the considerable advantages of their position within the city itself. Urban turf is a nightmare for attacking forces.

And the Islamic State has had time to prepare. After the group seized Mosul in 2014, its forces planted bombs and dug tunnels and otherwise sought to create secure communications and supplies, even as drones hover overhead. Over one million civilians are mixed in among the fighters, complicating coalition bombing efforts and creating the risk of atrocities from vengeful Iraqi forces.

These attacking forces represent a veritable “who’s who” of Iraq’s various armed forces and militias. Iraqi Kurds are spearheading the initial attacks, clearing the villages east of the city. Sunni tribesman, Iraqi army units (especially its elite counterterrorism force), and Shiite militias will also play a role. This unsavory mix is much of the problem. Sunnis dominate Mosul, and they see the Iraqi government and especially the Shiite militias as hostile, Iranian-backed forces: a perception that, alas, is well-grounded in reality. That is partly why many locals welcomed the Islamic State when it swept in two years ago, though most have soured on its brutal rule. The Kurds claim parts of Mosul, making its possession one more stake in the bitter contest between Iraqi Arabs and Kurds. Other minorities, such as Yazidis, Assyrians, and Chaldeans, also claim areas in or near Mosul as part of their historic homelands. To avoid these problems, the United States is trying to limit the roles of Kurdish and Shiite forces, particularly when it comes to liberating the actual city, even though these forces are among the most militarily competent foes of the Islamic State.

Foreign powers compound the problem. Iran is a major player in Iraq and is coordinating its proxies with the Abadi government. Turkey too claims an interest in Mosul, contending it will fight the Islamic State there. Both Iran and Turkey oppose the Islamic State, but they both have preferred local partners, with Iran in particular eager to minimize any U.S. influence.

And all these factions have factions within them.

In victory, unity will be even more difficult. The different factions have competing views of what Iraq should be. Sunnis see a strong central government as a threat and want local leaders to control local areas—and to get financial support from the central government, to boot. Kurds too want a high degree of decentralization if not outright independence, and they want to control Kurdish-populated areas, even when Kurds are intermingled with Iraq’s Arab population. Iraqi Shiite groups believe their community, Iraq’s largest, should rule the country, and many chauvinistic Shiite politicians will portray any concessions to the Sunni minority as a sellout to terrorists and their supporters. And all these factions have factions within them. The collapse in the price of oil and Iraq’s corruption and economic mismanagement in general make it hard for the government to reward its own supporters, let alone rival groups.

Success also has the makings of its own undoing. As the Islamic State threat recedes, Iraqi factions will continue their struggle over who gets what.

Success also has the makings of its own undoing. As the Islamic State threat recedes, Iraqi factions will continue their struggle over who gets what. The Abadi government does not have strong support across all of Iraq’s communities, and local Sunnis and Kurds will want a high degree of autonomy. Exploiting the risk of the Islamic State returning—a real concern—Shiite militias and the Iraqi government will be reluctant to cede power to local Sunnis and will use terrorist attacks and other Islamic State violence as a pretext for limiting the role of locals. No longer will there be an enemy at their doors to help convince (or compel) Iraqis to put aside their differences.

The Islamic State will seek to take advantage of these problems. It is preparing to go to ground, and will resume its campaign of assassinations against Sunni leaders it sees as collaborators and other foes, which it used to successfully revive itself post-2011 after being devastated by the U.S.-led counterinsurgency campaign. It and like-minded groups will prey on the abuses of government and Shiite forces, along with overall Sunni dissatisfaction.

So even if the battle for Mosul goes well militarily, the Obama administration should avoid proclaiming victory. Gains might be reversed or at least undermined, and the Islamic State is likely to try to step up international terrorism as its territory recedes. Infighting, the biggest danger, may take months or even years to manifest. Our past record suggests humility and caution should be the order of the day.