Deir Al-Zor Province - US-backed forces proclaimed the capture of Islamic State's last territory in Syria on Saturday, eliminating its rule over a self-proclaimed "caliphate", but the jihadist group remains a threat from sleeper cells around the world.
Originally an offshoot of al Qaeda, Isis took large swathes of Iraq and Syria from 2014, creating a theocracy known for beheadings and attacks by supporters in the West - but it was slowly beaten back to the village of Baghouz.
"We announce today the destruction of the so-called Islamic State organisation and the end of its ground control in its last pocket in Baghouz," Syrian Democratic Forces (SDF) general commander Mazloum Abdi told a victory ceremony.
SDF fighters, who besieged Baghouz for weeks while planes pounded from above, paraded in memory of 11 000 comrades killed in years of fighting against IS.
A band played the American national anthem.
Despite the euphoria, some shooting and mortar fire continued on Saturday morning, according to a Reuters journalist at Baghouz. And Abdi warned the campaign against the militant's more hidden threats must continue.
Some Isis fighters still hold out in Syria's remote central desert, and in Iraqi cities they have slipped into the shadows, staging shootings or kidnappings.
The United States believes the group's leader, Abu Bakr al-Baghdadi, is in Iraq. He stood at the pulpit of the medieval mosque in Mosul in 2014 to declare himself caliph, sovereign over all Muslims.
Further afield, jihadists in Afghanistan, Nigeria and elsewhere show no sign of recanting allegiance, and intelligence services say Isis devotees in the West might plot new attacks.
FRANCE, BRITAIN WELCOME DEVELOPMENTS
Still, the fall of Baghouz is a big milestone in a fight waged against the group by numerous local and global forces - some of them sworn enemies - for more than four years.
France's President Emmanuel Macron and Britain's Prime Minister Theresa May, whose countries also back the SDF, both welcomed Saturday's developments as a major step.
It also marked a big moment in Syria's eight-year war, wiping out one of the main contestants' territory, with the rest split between President Bashar al-Assad, Turkey-backed rebels and the Kurdish-led SDF.
Assad and Iranian allies have sworn to recapture all Syria, while Turkey has threatened to drive out the SDF, which it sees as a terrorist group. The continued presence of US troops in northeast Syria might avert this.
In his speech, Abdi urged Assad to recognise autonomous administration in areas controlled by the SDF and Turkey to quit areas of northern Syria it has taken over.
Islamic State originated as an al Qaeda faction in Iraq, but took advantage of Syria's civil war to seize land there and split from the global jihadist organisation.
In 2014, it grabbed Iraq's Mosul, erased the border with Syria and called on supporters worldwide to join a jihadist utopia, complete with currency, flag and passports.
Oil production, extortion and stolen antiquities financed its agenda, which included slaughtering some minorities, slave auctions of captured women, grotesque punishments for minor crimes, and the choreographed killing of hostages.
Those excesses drew an array of forces against it, driving it from Mosul and the Syrian city Raqqa during a year of heavy defeats in 2017 and driving it, eventually, down the Euphrates to Baghouz.
Over the past two months, some 60 000 people poured out, fleeing SDF bombardment and a shortage of food so severe that some were reduced to cooking grass.
Intense air strikes levelled entire districts. Rights groups said they killed many civilians, allegations the coalition has often disputed.
A mass grave the SDF discovered last month showed there were other dangers in the enclave, though it released no details on the identities of the victims or how they died.
Civilians made up more than half the people leaving Baghouz, the SDF said, including women from the Iraqi Yazidi sect whom the jihadists sexually enslaved.
Thousands of the group's unbending supporters, including many foreign women who married jihadists, also abandoned the enclave. At displacement camps the SDF had to keep them away from other, often traumatized, residents.
Their fate has befuddled foreign governments, who see them as a security threat and are loath to accede to SDF entreaties to repatriate them.
As the fighting progressed, convoys of trucks from Baghouz started to include hundreds, and then thousands, of surrendering jihadist fighters, many hobbling from their wounds.
The SDF said it captured hundreds more in recent weeks who tried to slip through its cordon and escape into Iraq or across the Euphrates and into the Syrian desert.
At the end, they were holed up in a tiny enclave from which they released a video showing fighters still shooting with smoke billowing above - an attempt to portray their last stand as heroic and a call to arms for future jihadists.Reuters