The long-awaited Iraqi offensive is underway to retake Mosul, Iraq’s second-largest city, from the Islamic State. On Monday, Iraqi security forces began the attack from positions 40 miles south of the city while Kurdish militias advanced from the north.

It isn’t known how many ISIS militants will fight to the death in Mosul, but Kurdish military officials estimate it will take three months to clear Iraq’s second-largest city.

The Islamic State, also known as ISIS or ISIL, seized Mosul in June 2014. The terrorist army constructed an elaborate network of fortifications, tunnels, and explosive devices throughout the city.

U.S. military officials estimate that 3,500 to 5,000 ISIS fighters are hunkered down in Mosul. They are almost encircled by about 10 times that number of troops deployed by Iraq’s central government and the Kurdistan Regional Government.

It is not known how many ISIS militants will fight to the death and how many will escape to fight another day, but Kurdish military officials estimate it will take about three months to clear the city.

The Pentagon has played a supporting role, deploying about 5,000 troops to train, advise, and assist Iraqi and Kurdish forces. A small detachment of Marines was dispatched to provide artillery support, while several hundred special operations forces have gathered intelligence, targeted ISIS leaders, and called in airstrikes from U.S., Iraqi, British, and French air forces.

Bitter Rifts in the Anti-ISIS Coalition

Iraqi Prime Minister Haider al-Abadi and Kurdistan Regional Government President Massoud Barzani have agreed that only Iraqi security forces and the Kurds’ peshmerga militia will play key roles in liberating Mosul. But Shiite militias, including some that are Iranian-controlled, are jockeying for a greater role.

This could be a major problem because Mosul is a predominantly Sunni city and human rights groups have criticized Shiite militias for abusing Sunni civilians in previous military operations in the Iraqi cities of Fallujah and Ramadi.

Turkey, which has deployed an estimated 2,000 troops in northern Iraq to fight Turkish Kurdish separatists, also is pushing for a prominent role in liberating Mosul. Ankara has deployed heavy artillery to bombard ISIS positions and has trained a force of local Sunni Arabs, Kurds, and Turkmen that it plans to back in the fighting.

The Iraqi government is wary of Turkey’s historic ties to Mosul, which once was part of the Ottoman Empire. Turkish President Recip Tayyip Erdogan has made the situation worse by proclaiming neo-Ottoman ambitions and asserting that Turkey has a duty to protect Iraqi Turkmen. As a Sunni chauvinist, he also has presented himself as a champion of Iraqi Sunnis threatened by Shiite domination.

Erdogan told Turkey’s parliament: “We will play a role in the Mosul liberation operation and no one can prevent us from participating.”

After Abadi criticized Turkey’s “occupation” of Iraqi territory and warned that it could spark a war, the ever-prickly Erdogan chastised the Iraqi prime minister: “You are not at my level … the army of the Turkish republic has not lost such standing as to receive instructions from you. You should know that we will do what we want to do.”

Planning Needed for a Political Victory

In addition to the sparring over military plans to liberate Mosul, there are growing concerns about inadequate planning for stabilizing the city after ISIS is defeated.

An exodus of up to 700,000 refugees from Mosul may overwhelm preparations for delivering humanitarian aid. It also is unclear how the Iraqi government will prevent refugee camps from turning into ISIS bases, or protect them from sectarian attacks or acts of or tribal vengeance.

To prevent ISIS from making a comeback, it is essential that the Iraqi government address festering issues over sectarian discrimination, corruption, and dysfunctional governance.

Many Sunni Arabs were pushed into the arms of ISIS, which they saw as a lesser evil, after suffering from what they regarded as malign neglect, disenfranchisement, and repression at the hands of the Shiite-dominated government in Baghdad.

Washington must encourage Baghdad to prepare a post-liberation political framework for Mosul and the surrounding region that assures anxious Sunni, Kurdish, Christian, Turkmen, and Yazidi minorities that they can count on an inclusive and responsive government in Baghdad to provide security, services, and respect for their political, religious, and human rights.

Mosul is an important test case. If Baghdad fails to address the sectarian divisions and legitimate political grievances, then ISIS, or something even worse, will emerge again to challenge its authority in the future.

>>> Related: U.S. Must Plan Now for the Day Mosul Is Liberated