Kurdish-led forces pronounced the death of the Islamic State group's nearly five-year-old "caliphate" Saturday after flushing out diehard jihadists from their very last bastion in eastern Syria.
Fighters of the US-backed Syrian Democratic Forces raised their yellow flag in Baghouz, the remote riverside village where jihadists from many countries made a desperate last stand.
The SDF's victory capped a deadly six-month operation against the final remnants of the "caliphate" which once stretched across a vast swathe of Iraq and Syria, and held seven million people in its sway.
World leaders hailed the victory as a major landmark in the fight against IS and its ideology, but warned that the group that spurred a spate of global terror attacks was far from defeated.
"Syrian Democratic Forces declare total elimination of so-called caliphate and 100 percent territorial defeat of ISIS," spokesman Mustefa Bali said in a statement, using another acronym for IS.
US President Donald Trump hailed the announcement but vowed to remained "vigilant" as the military coalition his country led against IS said the fight "is far from over".
In Al-Omar, an oil field used by the SDF as a staging base, fighters laid down their weapons and broke into song and dance.
They joined top Kurdish and Arab tribal officials, as well as a leading US envoy, for a ceremony unveiling a monument to their fallen comrades and celebrating the landmark victory.
The state proclaimed in mid-2014 by fugitive IS supremo Abu Bakr al-Baghdadi started collapsing in 2017 when parallel offensives in Iraq and Syria wrested back its main hubs Mosul and Raqa.
The nearly five years of fighting against the most brutal jihadist group in modern history left major cities in ruins and populations homeless.
- Foreigners last -
IS-held territory continued to shrink month after month and in September 2018 the SDF launched a final offensive on the last dregs of the "caliphate" in the Euphrates Valley.
SDF fighters last week expelled IS fighters who refused to surrender from an encampment on the edge of Baghouz and have since been hunting down a few survivors hiding on the reedy banks of the Euphrates River.
"Those who lasted the longest were mostly foreigners... Tunisians, Moroccans, Egyptians," Kurdish fighter Hisham Harun, 21, told AFP.
Around him, the former jihadist encampment was littered with bullet-riddled truck carcasses, discarded suicide belts and torn tents where the caliphate's last families sheltered for weeks.
Some bodies of suspected IS fighters could also be seen.
The Britain-based Syrian Observatory for Human Rights said 630 civilians, 750 SDF fighters and around 1,600 jihadists were killed in the offensive.
Kurdish officers and aid groups were flummoxed by the number of people who poured out of Baghouz, a small village even few Syrians knew of until this year.
As SDF forces pummelled IS positions and US warplanes dropped huge payloads on the riverside village, tens of thousands of people fled over a rocky hill.
- Aid emergency -
For weeks, the ghostly figures hobbled out of the besieged village, famished, often wounded but sometimes still defiantly proclaiming their support for IS.
The Kurdish-led force and foreign intelligence have screened more than 60,000 people since January, around 10 percent of them jihadists turning themselves in.
Most of the people evacuated from the smouldering ruins of Baghouz in recent days were relatives of IS members who now fill overcrowded camps further north in Syria's Kurdish-controlled region.
The biggest of them, Al-Hol, is struggling to host 74,000 people, including at least 25,000 school-aged children.
Among them are thousands of foreigners from more than 40 countries that are in most cases unwilling to take them back.
"The needs are huge and the camp is overwhelmed," International Committee of the Red Cross head Peter Maurer said Friday after a five-day visit to Syria.
- Still a threat -
Speaking at the ceremony in Al-Omar, top SDF commander Mazloum Kobane warned that a new phase had begun in anti-IS operations.
The US has vowed to draw down its forces in Syria, but Kobane appealed for sustained coalition assistance to help smash sleeper cells "which are a great threat to our region and the whole world".
US coalition envoy William Roebuck agreed and said "we still have much more to do to achieve an enduring defeat" of IS.
Trump vowed the United States would remain "vigilant... until it is finally defeated wherever it operates" and would continue to work with its partners "to totally crush radical Islamic terrorists".
The commander of anti-IS coalition forces, Lieutenant General Paul LaCamera, echoed him saying "now is not the time to rest".
"Make no mistake, Daesh is preserving their force," LaCamera said.
"They have made calculated decisions to preserve what is left of their dwindling personnel and capabilities by taking their chances in camps for internally displaced persons and going to ground in remote areas. They are waiting for the right time to reemerge."
French President Emmanuel Macron hailed the fall of Baghouz, saying "a significant threat to our country" has been "eliminated", while British Prime Minister Theresa May spoke of "a historic milestone".
The jihadists retain a presence in eastern Syria's vast Badia desert and various other hideouts from which they could wage the kind of deadly guerrilla insurgency that accompanied the rise of the Islamic State group.
John Spencer, a scholar at the Modern War Institute at West Point, warned that while the geographic caliphate had been dismantled, IS was far from defeated.
IS "is a terrorist organisation, all they have to do is put down their weapons and try to blend in with the population and just escape," he told AFP. "They're not gone, and they're not going to be gone."