BAGHOUZ, Syria -- U.S.-backed forces declared military victory over the Islamic State group in Syria on Saturday after liberating the last pocket of territory held by the militants, marking the end of a brutal self-styled caliphate the group carved out in large parts of Iraq and Syria in 2014.
After weeks of heavy fighting, the tent camp where the militants had made their final stand in the village of Baghouz was bombed to shreds. A field pitted with abandoned trenches and bomb craters, and littered with scorched tents and the twisted metal carcasses of vehicles, was all that remained. Half buried in the dirt was a tattered shred of IS's notorious black flag, while a giant yellow flag belonging to the Syrian Democratic Forces fluttered atop a shell-pocked building.
"Baghouz is free and the military victory against Daesh has been achieved," tweeted Mustafa Bali, a spokesman for the Kurdish-led SDF, referring to IS by its Arabic acronym.
The elimination of the last Islamic State stronghold in Baghouz brings to a close a grueling final battle that stretched across several weeks and saw thousands of people flee the territory and surrender in desperation, and hundreds killed.
It spells the end of the militants' proto-state, which at its height four years ago was the size of Britain and home to some 8 million people, but the extremist group still maintains a scattered presence and sleeper cells across Syria and Iraq. It's not known whether the group's leader, Abu Bakr al-Baghdadi, is still alive or where he might be hiding.
IS affiliates in Egypt's Sinai Peninsula, Afghanistan and other countries continue to pose a threat, and the group's ideology has inspired so-called lone-wolf attacks that had little if any connection to its leadership.
The campaign to take back the territory by the U.S. and its partners has spanned nearly five years and two U.S. presidencies, unleashed more than 100,000 bombs and killed untold numbers of fighters and civilians.
But the weekend announcement, in a tweet, was anti-climactic, and on the ground sporadic gunfire continued. A day earlier, President Donald Trump declared that Islamic State militants no longer control any territory in Syria, a victory he had been teasing for days.
Associated Press journalists in Baghouz on Saturday reported hearing mortars and gunfire directed toward a cliff overlooking Baghouz, where U.S.-led coalition airstrikes were carried out a day earlier. SDF spokesman Kino Gabriel said Friday that there were IS fighters hiding in caves near Baghouz and that clearing operations were still underway.
On Saturday, journalists were taken to the encampment in Baghouz where the group had made its last stand - a wasteland of wrecked vehicles, torn tents and scorched trees. A few bodies could be seen and the faint smell of rotting corpses hung in the air.
Personal belongings and other items including generators, oil barrels, water tanks and satellite dishes were scattered in the dirt. Cars and motorcycles were turned to rusted, twisted heaps of metal. There were unused rockets, mortars and grenades, as well as a pile of suicide vests. Amid the empty fox holes and trenches stood a building with a huge yellow SDF flag on top.
Ciya Kobani, an SDF commander, announced the end of the operation from the rooftop: "We have been victorious against Daesh," he declared.
At its height, the Islamic State group ruled a third of both Syria and Iraq, holding millions of people hostage to its harsh and violent interpretation of Islamic law. The group carried out massacres and documented them with slickly produced videos circulated online. It beheaded foreign journalists and aid workers, and burned alive a captured Jordanian pilot. During a rampage through Iraq's Sinjar region in 2014, it captured thousands of women and girls from the Yazidi religious minority and forced them into sexual slavery. Many remain missing to this day.
The group also used its caliphate as a launchpad for attacks around the globe, including the assaults in Paris in 2015 that killed more than 130 people.
While it imposed an unforgiving version of Islamic law through public beheadings and crucifixions, the group also carried out the mundane duties of governance in its territories, including regulating prices at markets and repairing infrastructure.
Cornered in Baghouz, the group fought fiercely and desperately to hang on to the last shred of territory it controlled, using thousands of civilians, including women and children, as human shields. In the final weeks, they streamed out of Baghouz, bedraggled, angry and hungry, overwhelming Kurdish-run camps in northern Syria where they are being held.
Aid organizations say more than 100 people have died in the journey from Baghouz to the al-Hol camp in Hassakeh province, or soon after arriving.