Syria's Kurds warned Sunday that despite the demise of the Islamic State's "caliphate", the thousands of foreign jihadists they hold are a time-bomb the world urgently needs to defuse.
World leaders were quick to hail Saturday's announcement by the Kurdish-led Syrian Democratic Forces that the last shred of land controlled by IS had been conquered.
But as the SDF swept the devastated the riverside village of Baghouz where jihadists made their dramatic last stand, the top Syrian Kurdish foreign affairs official warned that IS members captured during the assault still posed a threat.
"There are thousands of fighters, children and women and from 54 countries, not including Iraqis and Syrians, who are a serious burden and danger for us and for the international community," Abdel Karim Omar told AFP.
"Numbers increased massively during the last 20 days of the Baghouz operation," he said.
As the SDF's months-long, US-backed assault against the last IS strongholds in the Euphrates Valley closed in, jihadists and their families gradually gathered in the final refuge of Baghouz.
While some managed to escape, many foreigners stayed behind, either surrendering or fighting to the death.
According to the SDF, 66,000 people left the last IS pocket since January, including 5,000 jihadists and 24,000 of their relatives.
The assault was paused multiple times as the force opened humanitarian corridors for people to evacuate.
It screened droves of people scrambling out of Baghouz in recent weeks then dispatched them to camps further north, where most are still held.
Most of the jihadists' relatives who fled have been crammed into the Al-Hol camp, a facility built for 20,000 people but which now shelters 72,000.
The de facto autonomous Kurdish administration is northeastern Syria has warned it does not have capacity to detain so many people, let alone put them on trial.
But many of the suspected jihadists' countries of origin are reluctant to take them back due to potential security risks and the likely public backlash.
Some have even withdrawn citizenship from their nationals detained in Syria.
"There has to be coordination between us and the international community to address this danger," Abdel Karim Omar said.
"There are thousands of children who have been raised according to IS ideology," he added.
"If these children are not re-educated and re-integrated in their societies of origin, they are potential future terrorists."
The SDF's main support has been the international military coalition launched by the United States in mid-2014 to counter the expansion of IS.
The coalition has provided weapons and carried out 34,000 air strikes in support of local forces in Iraq and Syria, most of the recent ones to back ground advances by the SDF Kurdish-Arab alliance.
The aerial campaigns against IS hubs across a "caliphate" which once spanned territory the size of the United Kingdom have levelled major cities and contributed to the biggest wave of displacement since World War II.
According to the Airwars monitoring NGO, at least 7,500 civilians have died as a result of coalition actions in four and half years.
The conflict in Syria has killed more than 370,000 people since it erupted eight years ago, the Syrian Observatory for Human Rights war monitor says.
US President Donald Trump has vowed to drastically scale down US military presence in Syria once IS is defeated, leaving the Kurds exposed to threats by Damascus and Turkey.
Ankara sees the SDF as a terrorist organisation and Abdel Karim Omar warned that any cross-border offensive risked leading to mass breakouts from the jails where jihadists are currently held.
"Any new threat or new war would give an opportunity to these criminals to slip out," he said.
The International Rescue Committee has warned of an acute humanitarian emergency, saying the Al-Hol camp has reached "breaking point".
While the conclusion of the Baghouz battle capped draining years of battle, the SDF's top commander said Saturday that anti-IS operations were entering a new phase.
IS, faced with multiple offensives in Syria and Iraq since 2014, has morphed from a territorial force back into a clandestine insurgency group carrying out hit and run attacks in both countries.
Mazloum Kobane said during the victory ceremony in Al-Omar base on Saturday that the new focus would be IS sleeper cells that "are great threat to our region and the whole world."