IRBIL (Iraq) • Late last month, a column of Islamic State in Iraq and Syria (ISIS) fighters in armoured vehicles and on motorcycles thundered into eastern Syria to mount an unexpectedly fierce assault on US-backed militias near the city of Deir al-Zour.
The attackers overran outposts and killed or captured dozens of soldiers before being driven back by US warplanes.
The next day, in Iraq's northern Nineveh province, a roadside bomb killed four children as they travelled to their school by truck.
Local officials described the event as tragic but not surprising: The same province has experienced about 17 such attacks every month in the year since ISIS was officially declared defeated in Iraq.
An attack such as the one in eastern Syria reinforced a view that is widely held among US military and intelligence officials, as well as US allies in the region: Even as the territory claimed by ISIS continues to shrink, the group remains a powerful and deadly force across large swathes of Syria and Iraq.
In some regions, the militants appear to be gaining ground, reconstituting themselves as a brutal insurgency bent on killing local leaders and police officers and terrorising populations.
"They are reorganising and reactivating," Mr Masrour Barzani, the chancellor and top security official of Iraq's semi-autonomous Kurdish Regional Government, said in an interview before the Trump administration's surprise announcement on Wednesday that it will withdraw United States troops from Syria.
"From Syria to Anbar and Mosul, we see them coming back. The ideology is there, and they continue to have large numbers of followers."
For many security experts, the depiction of ISIS as "defeated" - as US President Donald Trump declared - is not only inaccurate, but is also dangerously misleading.
Despite its setbacks, the group maintains a formidable presence in Syria and Iraq, commanding cadres of fanatical, highly trained fighters believed to number in the thousands, including many who went into hiding after the fall of the group's self-declared caliphate.
ISIS continues to fiercely defend its remaining strongholds in Syria against relentless attacks by Kurdish and Syrian ground forces and US warplanes. And in Iraq, its scattered cells are waging a guerilla campaign that is gaining in intensity in three northern provinces.
An abrupt departure of US forces from Syria will almost certainly accelerate the group's resurgence on both sides of the border, officials and security experts say.
Without a significant US military presence - which has included personnel who collect intelligence and coordinate air strikes from forward operating bases - ISIS could regain its footing in Syria and, from there, direct terror operations inside Iraq, and perhaps elsewhere in the region and beyond.
"One of the key drivers behind the rise of ISIS was the group's freedom of manoeuvre inside Syria," said Mr Michael Knights, an expert on Iraqi military affairs at the Washington Institute for Near East Policy. "Syria is the place to get rockets and explosives, things you can't get as easily in Iraq. If we leave the job unfinished in Syria, you could see this start to happen again."
Current and former US intelligence officials echoed the view that the fight against ISIS is "unfinished", despite a four-year campaign that successfully liberated all but a fraction of the expanse of territory the group once held.
ISIS officials have boasted of their preparation for a new phase of battle after US troops leave.
One high-ranking ISIS official, reached on Wednesday through a social media platform, expressed doubt that US forces would completely withdraw from the region but said that his group would ultimately prevail.
The man, who uses the nom de guerre Abu Hamza, said Mr Trump's announcement of a troop withdrawal left even the terrorists perplexed. "There will always be some forces left which they will have control over. But maybe it's also a way for Trump to save face at the end," he said.