Sleeper cells, prisons teeming with extremists, camps crammed with their wives and children -- perils abound in Syria, nearly a month after the "Islamic State of Iraq and Syria" (ISIS) was declared defeated.
The Syrian Democratic Forces (SDF) announced victory over the ISIS proto-state on March 23rd, after a nearly five-year battle against the militant group.
The elimination of the physical territory closed a long chapter in the Syrian conflict, but the SDF and the military coalition backing it have warned the fight is far from over.
ISIS is still able "to carry out regular attacks on a weekly basis", said Tore Hamming, an expert on extremist movements at the European University Institute.
Even after losing their last scrap of territory in the eastern village of al-Baghouz, the extremists retain a presence in Syria's vast desert and hideouts elsewhere in the country.
This week alone, ISIS militants killed 35 fighters loyal to Syria's government in 48 hours -- feeding into a regime death toll over two days in excess of 60 at the hands of all extremist factions, the Syrian Observatory for Human Rights said.
Before that, on April 9th, ISIS claimed a double bombing that killed 13 people in the SDF-held city of al-Raqa.
Nicholas Heras, an analyst at the Centre for a New American Security, warns that ISIS still holds sizeable sway over "networks of local support".
"A big part of the ISIS strategy to regrow is that it continues to have strong ties into some of the local tribes in eastern Syria and western Iraq," he said.
As both regime and US-backed forces seek to hunt down ISIS sleeper cells on the run, the Kurdish authorities in north-east Syria face another major challenge.
Thousands of alleged extremist fighters -- including hundreds of foreigners -- are now being held in Kurdish-run jails, while their relatives languish in overcrowded camps for the displaced.
Their numbers have created a major headache for the semi-autonomous Kurdish administration, which now wants to put suspected extremists on trial.
"We have called for an international tribunal to be formed to try these terrorists," top foreign affairs official Abdel Karim Omar told AFP.
"Our priority is to try the criminals," he said.
Since 2014, ISIS fighters have been accused of carrying out beheadings, mass executions, rapes, abductions, and ethnic cleansing.
They stand accused of stoning to death women suspected of adultery, and forcing homosexuals off the top of high buildings.
While many extremists are now detained, they still pose a threat, according to experts.
"These detention centres are becoming breeding grounds for radicalisation," the Soufan Centre said in a report published on April 12th.
"There is also a major risk of ISIS-engineered prison break attempts," said the organisation, which specialises in security analysis.
Hamming said "neither Syria nor Iraq have the resources or the political stability to properly handle such a large number of prisoners".
Kurdish authorities are calling on the international community to help set up and guard new high-security detention facilities, after many Western states refused to take back their nationals.
In a rare exception on Saturday, Kosovo repatriated four men suspected of having fought for ISIS in Syria, among 110 of its citizens.
Syria's Kurds are also calling for much more support for displacement camps, where tens of thousands of people have amassed after fleeing battles against ISIS.
The camps host 12,000 foreigners -- 4,000 women and 8,000 children -- who are kept under surveillance, according to Omar.
The largest of these camps, al-Hol, has seen its population swell to more than 73,000 people, with conditions deteriorating as a result of the mass influx.
The International Rescue Committee has reported severe acute malnutrition, pneumonia, and dehydration among children in the camp.
The UN says 211 children under the age of five have died on their way to al-Hol or shortly after arrival since December.
The Soufan Centre warned the humanitarian crisis could be used as a recruitment tool.
ISIS "fighters are seeking ways to capitalise on the suffering in these camps to rejuvenate their organisation", it said.
As for the offspring of alleged foreign fighters, said Omar, "if these children are not sent home, re-educated and re-integrated into society, they will become future terrorists".