Before the Islamic State captured Mosul in June 2014, the city was second in size in the country only to Baghdad and home to some 2.4 million people. Over the past two years, however, its citizens have fled in droves, leaving only 750,000 or so behind. This is still a considerable population — more people than in most of the other Iraqi municipalities held by the Islamic State — and those still trapped in the city face a perilous period ahead as Iraqi forces advance toward the jihadist stronghold.
Complicating matters, Mosul is also one of Iraq's most diverse cities and the economic engine of the country's northern region. Though the bulk of the population is Sunni, the city also has sizable Kurdish, Shiite, Chaldean, Assyrian, Turkmen and Yazidi communities. Among these groups, Mosul's Sunni majority is widely perceived to be complicit in the Islamic State's capture of the city — one of many sources of tension among the civilian population with which Iraqi troops will have to contend, both during and after the operation.

The power struggles Baghdad will face do not come solely from within, either. Several countries have a keen interest in the future administration of Mosul, and the interests of some, such as Iran and Turkey, in the city are deeply rooted in their pasts.
Iraq's Meddlesome Neighbors
On the surface, Turkey has been locked in a diplomatic spat with Iraq over its military presence in the Bashiqa camp, which lies just east of Mosul. Since December 2015, a small contingent of Turkish troops has been housed in the camp to advise several thousand Sunni fighters and train Kurdish peshmerga units in the area. Ankara has insisted that its soldiers be given a role in the battle for Mosul, which they have since been granted. (Turkish-trained troops will operate under the peshmerga's command, which falls under the wider umbrella of the Iraqi military.) Ankara has chafed, however, at Baghdad's claim that Turkey's presence in Iraq amounts to an occupation, particularly since Ankara has not been given the go-ahead to participate in the urban warfare component of the Mosul operation. In response to Turkey's complaints, Iraqi Prime Minister Haider al-Abadi has insisted that only Iraqis will liberate "every inch" of their country, a declaration he has already adhered to in the use of Iraqi troops and militias to retake Ramadi, Tikrit and Fallujah from the Islamic State.
Of course, the real dispute between Turkey and Iraq runs much deeper than the Bashiqa camp. Ankara's interest in Mosul dates back to the early 20th century, when the 1916 Sykes-Picot Agreement and the 1923 Treaty of Lausanne peeled strips of territory, including Mosul, away from post-Ottoman Turkey's borders. The deals left Turkey with a sense of ownership over the city and its surrounding province, and Ankara has wielded influence in the area through ethnic Turkmen, Sunni and Kurdish communities. It has also worked hard to maintain close relationships with Nineveh Gov. Atheel al-Nujaifi and Kurdistan Regional Government (KRG) President Massoud Barzani to safeguard its power in northern Iraq.
Turkey's ties to the United States have also come in handy, particularly in carving out a role in the Mosul offensive. Through Washington, Ankara has relayed its demands to Baghdad that the Shiite Popular Mobilization Forces not be permitted to govern Mosul after its capture, as they did in Tikrit after the Islamic State had been beaten back from that city. Turkey has leaned on its warming relationship with Saudi Arabia in much the same way, projecting its concerns about Shiite militias assuming control of predominantly Sunni territory through Riyadh. Like Turkey, Saudi Arabia and its fellow Gulf states are deeply concerned that Iran could gain control of Mosul and northern Iraq if its Shiite proxies are permitted to lead the city.
And in many ways, their fears are well-founded. Iran does, in fact, wield a significant amount of influence in Iraq by funding and equipping the Popular Mobilization Forces and offering military advice to Baghdad. Moreover, Iran's political clout in the country is far more pronounced than Turkey's. Tehran maintains strong links to Shiite leaders in Baghdad and southern Iraq, as well as to Kurdish leaders in Sulaimaniyah, while Ankara's sway is confined primarily to the northern regions. That said, though many Shiite militias benefit from Iranian financial support and training, they are their own actors. Their loyalty to their commanders outweighs their allegiance to Baghdad and Iran, despite the fact that some technically belong to the Iraqi security forces.
Nevertheless, Turkey may have a hard time stopping the Shiite militias from taking control of Mosul once the fight is over. After all, some of these groups consider the battle for the city tantamount to destiny. At the same time, Iran is still working with Iraq — the official leader of the offensive responsible for corralling all the requisite forces together. In June, Iranian Foreign Minister Javad Zarif said, "We will leave Iraq whenever Iraq asks us to. And we will help Iraq to confront terrorism, as long as Iraq wants us to."
Weakened by Divisions
Iraq's Shiite militias are by no means the only groups hoping to stake their claim in the strategic city. After months of haggling, the Kurdish government in Arbil and the central government in Baghdad have reached an agreement on the role Kurdish forces will play in the operation in Mosul. (They are approaching from the north and northwest, while Iraqi security forces are pushing toward the city from the south.) The deal, however, avoids settling the tricky issue of allocating land and political authority once Mosul has been wrested from the Islamic State's grasp. On one hand, the Iraqi parliament (to which several Kurdish lawmakers belong) signaled a willingness to compromise on the issue in a recent vote to preserve the borders of Nineveh province, potentially eliminating the need to divvy up territory once the Mosul operation is finished. But on the other hand, the legislature has also formalized Baghdad's refusal to grant the KRG ownership of the lands Kurdish fighters have seized from the Islamic State over the past two years. Consequently, territorial claims will likely continue to be a sore spot between Baghdad and Arbil for years to come.
Meanwhile, the United States will remain an ever-present force in the push to reclaim Mosul, thanks in large part to the military might it has committed to Iraq and to its close relationship with the al-Abadi administration. Since March, U.S. military officials have held numerous meetings with Kurdish and Iraqi leaders to hash out the final contours of the offensive, and Washington has vowed to send additional troops to the Qayyarah air base to train and advise Iraqi troops.
Once the Islamic State is removed from the city, however, the difficult turf battles and political disputes will probably get only worse, undermining the administration's ability to govern effectively. Though Iraq is not the power vacuum it once was, its institutions have been weakened by infighting, corruption and regional grabs for autonomy, leaving it susceptible to the whims of its neighbors and allies. The United States will do its best to ensure that no other country becomes the dominant force in Iraq, but that might be a difficult task — especially after Mosul is safely returned to Baghdad's control and the political squabbles over the city's future intensify.