Syrian rebel fighters have accused the Islamic State of Iraq and the Levant (ISIL) group of taking more than 2,000 people hostage, and using them as human shields, as they retreated from the northern city of Manbij.

The Syrian Democratic Forces (SDF), a US-backed alliance consisting of Kurdish and Arab fighters, said on Friday they were in control of most of the city, held by ISIL, also known as ISIS, since 2014.

Sharfan Darwish, SDF spokesperson, said in a statement via Facebook that rebel fighters had "regained control over most of the city" while "clashes in several areas" continued as clearing operations were under way to flush out the last ISIL remnants.

"While withdrawing from a district of Manbij, Daesh jihadists abducted around 2,000 civilians from Al-Sirb neighbourhood," Darwish told the AFP news agency, using an Arabic acronym for ISIL.

"They used these civilians as human shields as they withdrew to Jarabulus, thus preventing us from targeting them," he said, adding that women and children were among those taken.

Darwish later told the Reuters news agency that the SDF had freed more than 2,000 civilian hostages held by ISIL.

The UK-based Syrian Observatory for Human Rights (SOHR), a monitoring group that records daily developments in Syria, said on Friday that around 500 cars had left Manbij carrying ISIL members and civilians, heading northeast towards Jarablus, a town under the control of the armed group on the Turkish border.

Al Jazeera's Reza Sayah, reporting from Gaziantep on the Turkish side of the Syria-Turkey border, said the loss of Manbij "appears to be a major setback for ISIL and a major achievement for all the forces battling the group in Syria."

He said there were "conflicting reports" about the recapturing of Manbij from ISIL.

"There are reports that perhaps there was an agreement between the SDF and ISIL, allowing them to leave without any attacks," he said.

"There are also more troubling reports that as they were leaving, ISIL took with them civilians, using them as human shields" so as not to be attacked.

"That is perhaps an explanation of why there was no fighting as ISIL fighters and their supporters left."

Manbij has been the main front in a US-led anti-ISIL coalition ground war for months.

The SDF and coalition forces launched an operation on May 31 and slowly advanced into the city.

The group said last week they had taken 90 percent of Manbij from ISIL.

Friday's advance was the "last operation and the last assault" to retake the city, SDF spokesperson Darwish told the Reuters news agency.

Separately, air strikes in opposition areas of Syria's northern Aleppo province on Friday killed at least 18 people, including children and hospital workers, activists and rescue workers told the Associated Press news agency.

The air raids hit the only hospital for women and children in the town of Kafr Hamra, killing two staffers, including a nurse, while 10 people were rescued from the rubble, the Syrian Civil Defense said.

Air strikes also hit a market in the nearby town of Urem al-Kubra, killing at least six people, according to the SOHR.

Urem al-Kubra lies on the road linking Aleppo to the northern rebel-controlled province of Idlib, which has also seen intense bombing.