By Michael Knights, Washington Institute–

But kicking out the Islamic State and keeping the peace are two very different things, so longer-term coalition support will be needed.

The liberation of Mosul is as close as one can find to a certainty in warfare. The Islamic State has perhaps 2,000 to 3,000 fighters to defend a 12-square-mile metropolis, as around 54,000 Iraqi security forces and Kurdish Peshmerga barrel down on them.

One can easily summon nightmare scenarios that could unfold during the battle. What if 1 million people flee the city? What if the Islamic State blows all the bridges over the Tigris River and wrecks the electricity and water systems, creating a humanitarian crisis? What if the first contact between the liberating security forces and local anti-Islamic State “resistance fighters,” who may themselves have been fighting the government before 2014, is marred by violence? What if clashes erupt between Iraqi Army forces and Turkish or Kurdish forces trying to enter the city? And what about the risk of the Iranian-supported Popular Mobilization Units (PMU) inserting themselves into the urban fight and demolishing a neighboring town such as Tal Afar, the home of many Islamic State leaders and a large Sunni Turkmen population?

One should take these risks seriously — and I have little doubt that the military planners involved in the operation are well aware of these complications. But my sense is that they will mostly not unfold as severely as observers fear. There is a good chance that the actual liberation of the city will be a ringing success: Most Moslawis will shelter in place, encouraged to stay where they are because many parts of the large city will not be directly affected by fighting, as the Islamic State does not have enough fighters to defend more than a few neighborhoods.

Iraq and the U.S.-led coalition will mount special operations and air power to prevent mass demolitions of key infrastructure, and the Iraqi government will use its U.S.-provided equipment to replace sabotaged bridge spans. Baghdad and its international allies have also made stringent efforts to keep Peshmerga and Shiite PMU forces out of the urban battle for Mosul — learning the lesson from the post-2003 occupation of the city, when the Sunni Arab majority violently rejected the Kurdish and Shiite security forces installed by the U.S. military.

There is now an unprecedented opportunity to work with Moslawis to stabilize their city. When Saddam Hussein fell, the population rebelled after the United States invaded Mosul and wiped away the old certainties of Baathist life. But this time, Iraqi Army-led forces are fighting to remove a medieval dictatorship that has terrorized Mosul for the last two-and-a-half years. With the proper arrangements in place, therefore, Moslawis will be greeting the Iraqi security forces as liberators for the first time.

The realities of the Mosul liberation are more cheery than the naysayers would have you believe. Since the spring of 2015, the Iraqi Army, Counterterrorism Service, and Federal Police have taken the lead in the liberation of the cities of Tikrit, Baiji, Ramadi, Hit, Fallujah, and Qayyarah. These victories were won almost entirely with Iraqi and Kurdish blood — but the international coalition played a key role in each and every victory through its air campaign and efforts to train and equip the Iraqi forces.

This international effort has reached a crescendo with the battle for Mosul. The skies of the city are now packed full of U.S. and coalition strike aircraft, surveillance drones, and refueling platforms. The full intelligence power of the U.S.-led coalition is focused on Mosul like a laser, giving Iraq the ability to reach into the city and kill Islamic State leaders and uncover their defenses in real time. U.S. aircraft are flying food, fuel, and ammunition directly into the warzone. U.S. and French artillery is on the ground, pounding Islamic State positions up to the edges of the city. Coalition special forces operate where we can see them — on the front lines, designating targets and advising Iraqi commanders — and where we can’t see them, in Mosul organizing resistance and performing special missions. At Iraqi headquarters such as the Qayyarah West air base, the coalition advisor teams are the glue that keeps together the Iraqi-Kurdish joint effort and minimizes Iraqi casualties.

But the coalition’s centrality to Iraq’s successful military campaign is a double-edged sword. What happens if coalition support disappears after Mosul is liberated? The previous iteration of the Islamic State was defeated in Iraq once before in 2007 to 2010, scorched right down to its roots by a powerful combination of U.S.-led special operations, smart U.S.-Iraqi counterinsurgency actions, and the uprisings launched by many Sunni militants. But the Islamic State recovered between 2010 and 2014 and returned stronger than ever, overrunning a third of the country just two-and-a-half years after U.S. forces departed. The real looming risk is that this could happen all over again, making the hard-won success of the Mosul operation only a temporary respite.

Diyala province, northeast of Baghdad, represents one potential future for Iraq. The province’s Sunni majority is dominated by the Badr Organization, an Iranian-backed Shiite militia that runs the local government and security forces. The U.S.-led coalition could not operate in the province because the Iranian-backed militias reject U.S. air support, and the coalition fears Badr’s response if its fighters were accidentally struck in an errant bombing attack. The Islamic State has already seized on the sectarian animosities aggravated by Badr’s dominance in Diyala, rebounding in the province to mount a fierce insurgency that threatens to overrun rural villages and provide a launchpad for provocative mass casualty attacks on Shiite civilians.

The United States needs to start planning now to prevent other parts of Iraq from suffering the same fate as Diyala. The first step to developing a different formula for post-conflict stabilization is extending the U.S.-led Combined Joint Task Force-Operation Inherent Resolve (CJTF-OIR) for a number of years, in agreement with the Iraqi government. The aim would be to set up a long-term security cooperation relationship that would span the current Iraqi government and its successor, locking this beneficial partnership in place under Iraq’s pragmatic current prime minister, Haider al-Abadi. Such a step would fall well within CJTF-OIR’s mission, which is to degrade the Islamic State until Iraq’s own forces can comfortably handle the threat. This objective has clearly not yet been reached in Diyala, nor will it be the case in the country’s remote border areas or along the Iraqi Kurdistan front line, where the Islamic State exploits Arab-Kurdish tensions.

An extension of CJTF-OIR would bring numerous benefits. One of the quiet successes of the task force has been the unprecedented internationalization of security cooperation with Iraq. From 2003 to 2011, the coalition was little more than a platform for U.S.-British cooperation — but today, most of the NATO partners and many G-20 nations are working under U.S. command in Iraq. This diversity is genuinely useful: It brings in capabilities the United States does not have, such as the Italian gendarmerie’s training mission with the Federal Police, and gives greater diplomatic stability to the Iraqi government’s relationship with the task force. The internationalization of CJTF-OIR needs to be sustained and even expanded in future years.

As the fight against the Islamic State transitions from the liberation of Iraq’s cities to longer-term stabilization, international efforts must adapt as well. Foreign involvement in major combat operations will shift to the Syrian city of Raqqa, where the Islamic State maintains its self-proclaimed capital. The security relationship with Iraq will become largely focused on intelligence sharing, as well as training, equipping, advising, and assisting the security forces. CJTF-OIR should develop a multiyear train and equip program that focuses on special forces and intelligence training for counterterrorism operations. The task force might develop a “Counterinsurgency Center of Excellence” for the Iraqi Army and Federal Police, and international trainers could also rejuvenate Iraq’s police academy, which was located in Mosul until 2014. International partners can help Iraq develop border security and logistical capacities to support operations in ungoverned spaces far from existing infrastructure. Without border security, the ongoing insecurity in Syria may again flood back into Mosul and other parts of northern Iraq.

We also need to better protect our friends in Iraq. Without this reassurance of long-term coalition support, Western allies such as Prime Minister Abadi, the Counterterrorism Service and Iraqi Army, the Iraqi Kurds, and Sunni tribal fighters could succumb to pressure and threats from the Iranian-backed Shiite militias in the years to come. Ongoing international focus could also help monitor and improve security cooperation between Baghdad and Iraqi Kurdistan along their disputed boundary.

The United States and its international partners in Iraq resemble a person who has once again pushed a huge boulder up a steep hill and is nearing the summit. Is it now safe to stop pushing and hope that the momentum will take the boulder over the top? Or will the boulder grind to a halt and then slowly, frighteningly roll back toward us?

We know how this worked out in 2011: We stopped pushing, and a mere 30 months later the Islamic State overran a third of Iraq. The U.S. mistake was to leave too quickly and too completely, setting the conditions for the Islamic State’s powerful resurgence. This time, we need to be more far-sighted. To make the forthcoming victory at Mosul into a permanent achievement, the international community must not disengage from the fight against the Islamic State after Mosul is liberated.

Michael Knights, a Lafer Fellow with The Washington Institute, has worked in all of Iraq’s provinces and spent time embedded with the country’s security forces.