Thousands of former residents are streaming back into the northern Syrian town of Manbij after the US-backed Syria Democratic Forces (SDF) ousted the last Islamic State (Isis) militants from their former stronghold. There were joyous celebrations as more than 2,000 civilian hostages, who had been used by Daesh as human shields, were rescued.

Men cut off their beards, women burned their niqabs and walked with their faces uncovered for the first time in more than two-and-a-half years, or defiantly smoked cigarettes; actions unthinkable under Isis rule.

Under the extremists, women had to wear long black cloaks that covered all but their eyes, while all men were forced to grow beards. Smoking was banned. Some of the locals who were freed hugged their rescuers and recounted the horrors of life under Daesh, showing journalists areas reserved for executions.

The militants were finally chased out of Manbij after a deal was reached that secured their departure for Jarabulus, which is under the control of Isis and it is located on the Turkish border. They took with them around 2,000 civilians as human shields, so they could avoid the air strikes of the international coalition. However, after the Daesh members arrived in Jarabulus, a number of civilians managed to return to Manbij.

Once the city was liberated, hundreds of cars and vehicles carrying families and their belongings returned from makeshift camps and villages in the countryside. "Thousands are coming back and shops are opening. Today is the first day life is returning to normal," Sharfan Darwish, spokesman for the SDF-allied Manbij Military Council told Reuters, adding they were working to restore basic services.

The capture of Manbij is the biggest defeat for the extremist group in Syria since July 2015, when they lost the town of Tal Abyad on the border with Turkey. The capture of Tal Abyad deprived the militant group of a direct route to bring in new foreign militants or supplies. Manbij is important because it lies on a key supply route between the Turkish border and the city of Raqqa, the de facto capital of the IS group's self-styled caliphate.

The battle is understood to have claimed the lives of at least 437 civilians, 299 SDF fighters, and 1,019 IS fighters, according to the British-based Syrian Observatory for Human Rights. Manbij had been under IS control since January 2014, when the extremists evicted other Syrian militant groups from the town.