Sleeper cells, prisons teeming with jihadists, camps crammed with their wives and children -- perils abound in Syria, nearly a month after the Islamic State group's "caliphate" was declared defeated.
The US-backed Syrian Democratic Forces announced victory over the IS proto-state on March 23, after a nearly five-year battle against the militant group.
The elimination of the physical "caliphate" closed a long chapter in the Syrian conflict, but the SDF and the US-led military coalition have warned the fight is far from over.
IS is still able "to carry out regular attacks on a weekly basis", said Tore Hamming, an expert on jihadist movements at the European University Institute.
Even after losing their last scrap of territory in the eastern village of Baghuz, the jihadists retain a presence in Syria's vast desert and hideouts elsewhere in the country.
This week alone, IS 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 jihadist factions -- the Syrian Observatory for Human Rights said.
Before that, on April 9, IS claimed a double bombing that killed 13 people in the SDF-held city of Raqa.
The White House has said that it would keep 400 US troops in Syria "for a period of time", after initially shocking allies in December by announcing a full withdrawal of 2,000 soldiers.
But Hamming said this diminished contingent would struggle to deal with the lingering jihadist threat.
"IS is still very active and will remain so. The small number of US forces will not solve that entirely," he said.
- 'Breeding grounds' -
Nicholas Heras, an analyst at the Center for a New American Security, warns that IS 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, using an alternative acronym for the jihadist group.
As both regime and US-backed forces seek to hunt down IS sleeper cells on the run, the Kurdish authorities in northeast Syria face another major challenge.
Thousands of alleged jihadist 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 jihadists 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, IS 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 jihadists are now detained, they still pose a threat, according to experts.
"These detention centres are becoming breeding grounds for radicalisation," the Soufan Center said in a report published on April 12.
"There is also a major risk of IS-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".
- 'Future terrorists'? -
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 IS 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 IS.
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 United Nations 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.
IS "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 jihadists, said Omar, "if these children are not sent home, re-educated and re-integrated into society, they will become future terrorists."