Mosul, the most important city in northern Iraq, has been under the control of the militant group since the summer of 2014. Its fall signaled the real rise of the Islamic State, which, unlike other radical outfits, now commanded real territory and state infrastructure. And it exposed the hopeless dysfunction of the government in Baghdad, which had failed to build a united, stable Iraqi state in the wake of the U.S.-led invasion in 2003.

Now, as my colleagues reported Monday, the government's push toward Mosul marks the “most ambitious offensive launched by Iraq’s security forces” since the toppling of dictator Saddam Hussein. Their advance from the south is joined by Kurdish peshmerga forces, loyal to the semiautonomous Kurdistan Regional Government, moving toward Mosul from the east.

It may take weeks to capture the city. And although most observers are confident of a military victory, many worry about what may follow: a humanitarian crisis for the hundreds of thousands trapped in the city and brutal reprisals by the Islamic State, which has killed countless Iraqis and Syrians through attacks even as it loses ground on the battlefield.

What further complicates the picture is the intense, tangled geopolitics of the region. Here are the factions battling over the city.

Islamic State: The fundamentalist Sunni group entered the global imagination when its fighters motored into Mosul on pickup trucks in June 2014 as a demoralized, routed Iraqi army melted away before their advance. The city's capture by the Islamic State was enabled in part by the actions of the Shiite-dominated government, which had embittered and marginalized segments of Iraq's Sunni minority, including in Mosul.

With its banner flying above one of the Middle East's most diverse and ancient cities, the Islamic State declared its “caliphate.” It demolished a dusty rampart along the border with Syria in an act supposedly symbolizing the smashing of colonial boundaries. And it went on to ransack and destroy myriad ancient pre-Islamic and biblical shrines and sites in Mosul and its culturally rich environs, while carrying out a hideous campaign of slaughter, rape and executions.

The capture of Mosul has been the source of much strength and perceived “legitimacy” for the Islamic State, so it won't give up the city without a fight. As my colleagues report, officials in Washington, Baghdad and Irbil expect a slow, miserable slog, with the extremists deploying booby traps, improvised explosive devices and suicide attacks.

The Iraqi government: The offensive is a huge test for Prime Minister Haidar al-Abadi and a government in Baghdad that has lurched from crisis to crisis. Retaking the key city is crucial if Abadi and his allies have any hope of patching up the many divisions of a deeply fractured country.

“We will soon meet in Mosul to celebrate in liberation and your salvation,” Abadi declared this year, after Iraqi forces wrested back control of a string of largely Sunni towns held by the Islamic State. “We will rebuild what has been destroyed by this criminal gang.”

Iraqi army and police forces and some allied Sunni tribal units will be reinforced by controversial Shiite militias — fighters essential to the war effort against the Islamic State but largely loathed by Iraq's Sunni population. Some prominent militia commanders have framed the Mosul campaign in sectarian terms, rhetoric that ought to worry everyone, not least the government in Baghdad.

The Kurds: Kurdish units have been on the front lines in the fight against the Islamic State and often have ranked among the most effective partners on the ground for U.S.-led efforts against the group. But while Kurdish forces share the Iraqi desire to liberate Mosul from the militants, they are not quite as concerned about Iraqi unity. They have separate interests, not least the consolidation of Iraqi Kurdistan, where there's a growing groundswell for a move toward independence.

Kurdish Peshmerga advance in Mosul offensive (Reuters)

Historically, Kurdish factions have also eyed Mosul and its surrounding oil fields. Peshmerga fighters rushed into the vacuum left after Hussein's army melted away in 2003 and set up checkpoints, prompting outrage among locals, who had no desire to be governed by the Kurds. U.S. forces eventually rolled into the city — an invasion that now seems like ancient history.

Questions also remain about the participation of Kurdish units loyal to the Kurdistan Workers' Party, or PKK, an organization that is considered a terrorist group by both Turkey and the United States but whose affiliates have pushed back the Islamic State in Iraq and Syria. Officials in Washington indicated last week that they would not tolerate the PKK joining the Mosul offensive.

The Turks: Turkey, which is at odds with the PKK and its affiliated militias operating in Syria, is also deeply invested in the Mosul campaign. Small contingents of Turkish troops have been deployed in northern Iraq for some time now — ostensibly to train local Sunni fighters — and are apparently playing a support role in the offensive, much to the consternation of Baghdad, which called on Turkey to withdraw.

Turkish President Recep Tayyip Erdogan balked at the suggestion.

“We will be in the operation and we will be at the table,” Erdogan said in a televised speech on Monday. “Our brothers are there and our relatives are there. It is out of the question that we are not involved.”

Mosul is an emotional sticking point for some Turkish nationalists. After World War I, the fledgling Turkish republic briefly exercised a claim to the city — once the capital of a prominent Ottoman province — and other areas in northern Iraq and Syria, which were summarily stripped from Turkish control by Western powers. Today, Ankara wants to maintain some level of influence in northern Iraq, not least to check the aspirations of Kurdish nationalism as well as strategic support for militant separatist outfits like the PKK.

Refugee agencies brace for Mosul exodus (Reuters)

More on WorldViews