With the Islamic State group all but vanquished from its self-proclaimed "caliphate" in Iraq and Syria, the US-led coalition that has been fighting the jihadists for more than three years is transforming its mission.
Eager to avoid a repeat of 2011, when America completed its troop withdrawal from Iraq only to watch in horror as IS later overran swathes of the country, the coalition is focusing on what it must do to stop a jihadi re-emergence.
Defense Secretary Jim Mattis recently told reporters the mission now is shifting towards stabilization and making sure an "ISIS 2.0" can't pop up, using an alternate acronym to refer to the jihadist group.
Already, the Pentagon has said it will stay in Syria "as long as we need to."
"The longer term recovery is going to take a lot of effort and a lot of years after what (IS) did, because they forcibly kept innocent people in the midst of the combat zone, and that meant the residential areas took damage, the public areas -- everything took damage," he said, adding that a most pressing need is to clear cities and terrain of innumerable bombs, mines and booby traps.
America hastily convened a coalition in 2014 after IS swept across vast tracts of Iraqi and Syrian territory, terrorizing residents and leaving a trail of murder and atrocity in their wake.
The US military began bombing them that summer with the immediate goal of stopping IS from reaching Baghdad after they'd seized a string of major cities including Mosul and Tikrit.
Today, the coalition boasts 70 nations as well as international organizations like NATO and Interpol.
Though some alliance members are there in name only, bigger countries like Britain, France, Canada and Australia are helping in the skies and on the ground.
A State Department official said some coalition members can play an increased role now that the main campaign is over, including by countering IS propaganda, sending in police trainers and providing funding.
Nicholas Heras, a fellow at the Center for a New American Security, said that ideally, "you are going to have different partners taking on many different aspects of the stabilizing mission, the part that they do well."
With IS now cleared from 98 percent of the terrain they once held, nations like France and Australia have begun pulling some military assets -- including planes and artillery -- from Iraq and Syria, and the Pentagon has said the tapering off of bombing missions means it has more resources to fight the Taliban in Afghanistan.
But the coalition is keeping an indefinite presence to help Iraqis get the support and training they need, and to protect a Kurdish-Arab alliance who fought against IS in Syria.
"If we were to repeat the mistakes that we made when the Iraq War came to a close then we are very much likely to see a repeat of the tragedies that followed," warned Steve Warren, a retired Army colonel who was top spokesman for the coalition between 2015 and 2016.
"They need to morph into a stabilization force, there's no question."
- 'Skin in the game' -
America has about 2,000 troops in Syria and more than 5,000 in Iraq, augmented in both countries by coalition members who have provided commandos and military trainers.
But where Iraq now has a cohesive military and some degree of political stability, Syria is mired in civil war and President Bashar al-Assad is working with Russia and Iranian militias to maintain control of areas once in the hands of rebels or IS.
That means the US must keep boots on the ground in Syria to protect fighters from the Syrian Democratic Forces who it backed to fight IS.
"Unless we want to cede eastern Syria to the Iranians, (the coalition) needs to be there," Warren told AFP.
"Not necessarily the US -- it's other partners who have skin in this game, which includes every country in Europe," he added, referring to the refugee crisis that has gripped the continent in part because of Syria.
Additionally, extremist groups the world over are rebranding themselves under the IS banner, meaning the anti-IS coalition will have a role beyond the Middle East, including in African nations.
Last year, four new African nations signed up to the coalition: Djibouti, Niger, Cameroon and Chad.
"Pre-existing terrorist organizations like in the Philippines, like in Bangladesh, like in the Sinai and Afghanistan, they have basically rebranded themselves and started flying the ISIS flag in order to gain attraction and resources," the State Department official told AFP.
US military officials stress the fight against IS is not over, and warn of the jihadists in Iraq and Syria returning to a more traditional insurgency.
"Their repressive ideology continues. The conditions remain present for Daesh to return, and only through coalition and international efforts can the defeat become permanent," coalition commander Lieutenant General Paul Funk said, using an Arabic acronym for the group.