(CNN) The assault on Mosul has begun after months of planning and often tortuous negotiation about the make-up of the attack force.

But how it will unfold depends on many variables: the cooperation of Kurdish and Iraqi soldiers, the effectiveness of air support, how the people of Mosul react and above all, how ISIS fighters inside the city respond.

The assault force

Both Iraqi Prime Minister Haider al-Abadi and Kurdish President Masoud Barzani have made it clear that only their forces will take part in the offensive. The Iraqi Security Forces (ISF) contingent includes the battle-hardened Counter Terrorism Force and Golden Division, which have been trained by the US and have recent experience against ISIS in Fallujah and Ramadi. But the Iraqi force also includes newly minted brigades stood up since the collapse of previous army divisions in 2014.

A militia made up largely of former Mosul police will also come under Kurdish Peshmerga command. There is also support from detachments of coalition special forces on the ground and from advisers and trainers further back.

Altogether there will be about 100,000 troops involved in the offensive, though some will have a holding role behind the front lines. They comprise about 50,000 Iraqi troops and 40,000 Peshmerga, as well as Sunni tribal militia (about 9,000) and smaller Christian, Shabak, Turkmen and Yazidi militia units.

Keeping them all to their assigned tasks will be a major challenge: all are thirsting for revenge. And two additional forces are waiting in the wings -- eying each other suspiciously. One is a small Turkish military contingent stationed on Mount Bashiqa to the east of Mosul with artillery and tanks. The other is the Shia militia -- the Hashd al Shabi -- which is determined to play some role in the offensive.

Each has warned the other that any false move will provoke immediate retaliation. President Recep Tayyip Erdogan of Turkey has said repeatedly that Mosul -- once part of the Ottoman Empire -- is a Sunni city. According to the overall plan, the Hashd al Shabi are meant to take the lead in expelling ISIS from the town of Tal Afar , a stronghold of the terror group to the west of Mosul. But Tal Afar includes a sizable Turkmen population, and Turkish officials have warned that thy will protect their brethren from "ethnic cleansing."

JUST WATCHED Battle for ISIS-held city begins Replay More Videos ... MUST WATCH Battle for ISIS-held city begins 02:16

First phase

The first phase of the offensive -- to rid the plains east of Mosul of ISIS and begin to squeeze the city -- is likely to be the easiest. ISIS defensive positions cannot hold such a broad swathe of flat land, and any movement will be punished by airstrikes. By sunrise on Monday, Peshmerga units had already made progress in pushing west through the Nineveh Plains but they were encountering resistance in several villages.

A large force of Iraqi Security Forces will approach from Qayyara in the south -- along the west bank of the Tigris river -- while an ISF and Peshmerga force will close in on the city from the Mosul Dam area to the north. The aim is to stretch ISIS defenses. As Peshmerga and ISF forces approach the city, those defenses will get thicker and the going harder. ISIS is set up to drag the attacking forces into urban combat.

The effectiveness of air support

Nearly 100 aircraft -- coalition and Iraqi -- are said to be supporting the offensive. They include heavy bombers such as the B1, ground attack aircraft, fighters and armed drones. In the two weeks to last Friday, this mix had carried out 66 strikes according to the coalition spokesman in Baghdad, Lieutenant Colonel John Dorrian.

The coalition has had months to build up a detailed picture of ISIS positions and movements in and around Mosul. Its targeting recently has included tunnel entrances, rocket rails, weapons caches, mortar positions and the leadership on the ground.

What it can't do is dismantle the hundreds of improvised explosive devices ISIS is suspected of sowing all around and inside the city. One source told CNN that dozens of IEDs had been primed in Mosul Forest, an area of woodland in the heart of the city. Nor can air power deal with the deadly ISIS snipers.

JUST WATCHED On board the Charles de Gaulle Replay More Videos ... MUST WATCH On board the Charles de Gaulle 01:49

Inside the city

It's extraordinarily difficult to gauge the mood inside Mosul. Communications are very haphazard and very few people have been able to escape. But anecdotal evidence suggests sporadic resistance in the form of assassinations of ISIS members, met with savage reprisals against those deemed to be spies, informers and deserters. Those with contacts inside the city say they are told of growing paranoia among the ISIS fighters. They expect the group's foreign fighters -- largely Chechen, Uyghur, Tunisian and Moroccan -- to lead the defense of the city.

In leaflets dropped into the city and radio broadcasts, the Iraqi government has urged people to remain indoors and hunker down. Those leaflets include a dedicated phone number for civilians to report ISIS movements.

JUST WATCHED Mosul awaits assault on ISIS Replay More Videos ... MUST WATCH Mosul awaits assault on ISIS 02:43

A stream of people trying to escape the city would complicate the assault. ISIS could hide suicide bombers among the exodus, and fighters could try to slip out of the city. Both the Peshmerga and Iraqi army have organized screening points to prevent ISIS members from escaping, but aid agencies say that if the outflow exceeds 150,000 people, the systems in place to process and accommodate people will be overwhelmed.

Both the aid agencies and military commanders say the priority is to keep people in their homes or accommodate them in liberated parts of the city. Wholesale destruction of city blocks, as in Aleppo, is to be avoided to prevent what the UN says could otherwise be a humanitarian catastrophe on the scale of Rwanda.

The ISIS response

Coalition sources estimate that there are a maximum 5,000 ISIS fighters in Mosul. The group's supporters have claimed there are at least 7,000. But it's still a very small number in the face of as many as 50,000 ground troops approaching from three different axes.

Among the factors that will influence ISIS' defense of Mosul: how far has its leadership been degraded by weeks of targeted strikes? Does it retain a meaningful command and control chain? Is there dissent in the ranks? Some reports claim that dozens of ISIS members have been executed for alleged disloyalty in recent weeks. Other reports speak of injured ISIS fighters and their families being evacuated to the west of the city and possibly to Syria.

Some Kurdish commanders have told CNN they expect ISIS to retreat from the east of the city across the Tigris River to the more densely populated west bank, where ISIS allegedly has greater support. Satellite imagery suggests the group's defenses on the west bank are stronger. Its fighters can also escape into the open desert from there if they can avoid the blocking line that the Shia militia are tasked with creating.

But what will happen to the bridges linking the two sides of the city? One was damaged in an airstrike Sunday. Their demolition could complicate any ISIS retreat, but would also deprive attacking forces of an option -- and add another headache in Mosul's eventual reconstruction.

A source inside Mosul told CNN that ISIS now has an elaborate tunnel network that will help its fighters move undetected and maybe emerge behind the offensive's front lines.

How long will it all take?

It was on June 29, 2014 that ISIS' Abu Bakr al Baghdadi declared the Caliphate from the pulpit of the Grand Mosque in Mosul. Since then, the mood of the city has become ever more desperate in the face of growing shortages, arbitrary taxation and savage punishments for perceived offenders.

The ISIS leadership knows that defending Mosul successfully is impossible. What no one knows is whether it will fight to the bitter end in the belief that martyrdom is the only option, or seek to fight another day from its diminishing territory in Syria. Some coalition commanders expect fighting to continue for months, with isolated ISIS cells trying to make the city ungovernable and drag the Shia militia into combat -- sparking another bout of sectarian warfare. Others believe that ISIS is now so degraded, starved of resources and leadership and with morale brittle, that it could be evicted from Mosul within weeks.

But the real challenge will follow -- rehabilitating and governing a city that is in many ways a microcosm of Iraq's overlapping sectarian, religious and tribal rivalries. Different groups are still arguing over what Mosul should look like on the "day after." And ISIS will not evaporate in Iraq. It will revert to being the terrorist group that adopted a policy of "aggressive hibernation" in 2010, which helped it recover from near extinction.