BEIRUT (Reuters) - Thousands of displaced residents streamed back into the northern Syrian town of Manbij on Saturday after U.S.-backed fighters ousted the last Islamic State militants from their former stronghold, residents and U.S. allies said.

The U.S.-backed Syria Democratic Forces (SDF) announced on Friday they had seized full control of the city near the Turkish border after the departure of the last of the militants, who had been using civilians as human shields.

Hundreds of cars and vehicles carrying families and their belongings flocked into the city from makeshift camps and villages in the countryside, where many of the city’s residents took shelter during the two-month campaign, according to an SDF official and relatives who were in contact with residents.

“Thousands are coming back and shops are opening. Today is the first day life is returning to normal,” said Sharfan Darwish, spokesman for the SDF-allied Manbij Military Council told Reuters from the city, adding they were working to restore basic services.

Pro-SDF news sites showed jubilant families who had been trapped in the city during the fighting talking about how harsh life was under Islamic State and its imposition of strict dress codes in public.

Their footage showed men shaving their beards and veiled women setting fire to niqabs they were forced to wear in public that covered their entire face apart from the eyes.

The militants were finally ousted after a deal was reached on Friday that secured their departure together with some 2,000 civilians, believed to have been their relatives, toward their stronghold of Jarablus near the border with Turkey, a Syrian from Manbij who is in touch with relatives there said.

Slideshow ( 9 images )

It was not clear whether those leaving were hostages or had left voluntarily, a Kurdish source said.

The SDF, formed last year by recruiting Arabs to join forces with the powerful YPG Kurdish militia, launched an offensive with the support of U.S.-led strikes at the end of May to remove Islamic State from areas it controls along the Turkish border.

BLOW TO MILITANTS

The loss of Manbij, occupied by Islamic State since early 2014, is a big blow to the militants as it is of strategic importance, serving as a conduit for the transit of foreign jihadists and provisions from the Turkish border.

The operation, in which U.S. special forces played a significant role on the ground, marks the most ambitious advance by a group allied to Washington in Syria since the United States launched its military campaign against Islamic State two years ago.

Darwish attributed the speedy return to life in the city to a military and aerial campaign that he said spared many neighborhoods where thousands of civilians had remained even at the height of fighting.

Slideshow ( 9 images )

Despite intensive U.S. bombing of bridges, several hospitals and a large silo in the course of the campaign, the city appears to have been spared the devastation of other cities in the Syrian conflict.

The SDF, which had already cleared over 13,000 mines, was sweeping some neighborhoods in search of militant sleeper cells suspected to still be operating.

A former resident of the city said he had reports from family members that the Kurdish YPG, who are the dominant group within the SDF, had rounded up dozens of young men before screening them because of concerns that some of them belonged to sleeper cells.

The capture of Manbij bolsters the position of Kurds who already control an uninterrupted 400 km (250 mile) stretch of Syria’s northern border with Turkey.

Washington has long lacked capable proxies on the ground, but has found its first strong allies in SDF.

Their gains have alarmed rebel forces battling President Bashar al-Assad, who say they will respond with force to any attempt to break up Syria.