A long-awaited offensive to recapture the Iraqi city of Mosul from the Islamic State began early Monday morning, with US forces involved in their largest operation since withdrawing from the country in 2011.

Some 30,000 soldiers are taking part in the battle for the extremist group’s last major stronghold in Iraq. Among them are Kurdish fighters, the Iraqi army, Shiite militias and Sunni tribal groups — a patchwork alliance of unlikely allies backed by US airpower and support.

When ISIS took over the city of 1.5 million people two years ago, Mosul became the largest population center under the group’s control. Now, with such a force lined up against it, that control looks to be nearing an end.

Lt. Gen. Stephen Townsend, commander of the US-led coalition battling the jihadist group, said the operation could take “weeks, possibly longer.”

Few doubt that a victory is certain. But big battles have big consequences. Solving one problem — getting ISIS out of Mosul — will unleash new struggles in Iraq and beyond. Here are the biggest challenges ahead:

People who fled the Islamic State's strongholds of Hawija and Mosul receive aid at a camp for displaced people in Daquq, Iraq, on Oct. 13.

Ako Rasheed/Reuters

An immediate impact of the offensive to retake Mosul is the near certainty of a refugee crisis that no one is prepared for.

Some 200,000 people are expected to be displaced in the first weeks of fighting, according to the United Nations office responsible for coordinating humanitarian assistance in Iraq. In total, as many as 1 million people could flee Mosul, according to the International Rescue Committee, with 700,000 requiring water and vital aid immediately. Aid agencies have been scrambling to prepare refugee camps to house the fleeing civilians, but currently only have capacity for 60,000 people

Save the Children says “scores” of young children are dying already as families flee the city, having run out of water or stepped on land mines.

We don’t have to look very far back to guess what might follow an assault on Mosul. During the recapture of Falluja, another major ISIS stronghold in Iraq that the group lost earlier this year, residents fled the fighting to find themselves in “apocalyptic” conditions: no tents, no mattresses, no toilets and not enough food.

A similarly grim situation may await residents of Mosul, who have lived for two years under the brutal rule of the Islamic State.

Smoke rises from clashes in the east of Mosul during clashes with Islamic State militants, Iraq, on Oct. 17.

Azad Lashkari/Reuters

Before civilians are able to make it to refugee camps, they face incredible danger.

Mosul is a densely populated city. An all-out offensive to recapture it is going to require heavy reliance on airstrikes and artillery, both of which risk harming civilians.

The US-led coalition of international powers that's leading the air campaign against ISIS in Iraq and Syria, in cooperation with forces on the ground, has repeatedly stated that it has strict measures to avoid civilian casualties. But independent monitoring group Airwars suggests the number of civilians killed by coalition airstrikes could be as high as 511 in Iraq alone. The coalition has acknowledged 41 civilian deaths since it began its campaign against ISIS.

In short, there is plenty to suggest that civilians face immense danger from US-led airstrikes.

The Iraqi government claims it will create escape routes for civilians, though it also dropped leaflets warning residents to stay in their homes. Aid agencies say these routes have not been made clear to city residents.

Aleksandar Milutinovic, the International Rescue Committee’s Iraq country director, said thousands could end up caught in the crossfire.

“Civilians who attempt to escape the city will have little choice but to take their lives into their own hands and pray that they are able to avoid snipers, landmines, booby traps and other explosives. The IRC is also worried that oil burning in trenches around Mosul will harm the health of children and the elderly,” he said.

Peshmerga forces gather in the east of Mosul to attack Islamic State militants in Mosul, Iraq, on Oct. 17.

Azad Lashkari/Reuters

The Iraqi government needs all the help it can get in the battle against ISIS, hence the unlikely alliance that lined up to retake the city.

Shiite paramilitary forces, backed by Iran, have played a prominent role fighting ISIS alongside the Iraqi army. The militias made their intention to take part in the Mosul offensive very clear. A last-minute agreement to divert them instead to the smaller city of Hawija, also under ISIS control, won't alleviate concerns about their overall role.

Many of these militias have a record of sectarian abuse that could rival their ISIS enemies. In the battle to retake Falluja, Shiite militias were reported to have engaged in torture, abuse and murder of Sunni civilians they suspected of belonging to ISIS.

The US has expressed concern that militias' involvement in future operations could mean a repeat of those abuses.

ISIS, which adheres to an extreme interpretation of Sunni Islam, was able to make inroads in Mosul and hold it for so long partly because the Sunni community there felt marginalized and abused by the Shiite government in Baghdad. More abuses would signal to Iraqi Sunnis that nothing has changed — maybe even that ISIS had a point. This would, in turn, harm the prospect of a lasting peace.

Fighters from a predominantly Sunni force take part in a training session on Oct. 6 in Bashiqa, Iraq, before the battle to recapture Mosul.

Thaier Al-Sudani/Reuters

The Kurds, the Iraqi army, the Shiite militias and the Sunni tribal groups fighting ISIS in Mosul all have in common a hatred for the extremist group. But each has a different idea of what a future Iraq will look like.

Mosul will likely be one of the first testing grounds for cooperation among Iraq’s different ethnic communities post-ISIS.

The Kurds, who are fighting in Mosul despite having no territorial claims to it, want to ensure that the city does not become dominated by the Shiite militias and an emboldened central government in Baghdad. They also want to prevent an extremist group like ISIS from ever taking over there again. Sunni tribes who have opposed ISIS from the beginning also want more autonomy from Baghdad.

Add to the mix Turkey, with about 800 soldiers stationed in Bashiqa, north of Mosul. The NATO member-nation also trained Sunni forces in preparation for the fight, and has warned against attempts to change Mosul's Sunni character. Turkish President Recep Tayyip Erdogan said on Monday it is “out of the question” that his country’s forces should be left out of the Mosul operation, and earlier lashed out at Iraq's prime minister.

ISIS' presence in northern Iraq pushed some of these problems aside. But once that fierce common enemy is finally beaten, competing powers may decide it's time to revive their issues.

From PRI's The World ©2016 PRI