A group of ISIL fighters has evacuated the Syrian city of Raqqa overnight, taking civilians with them as human shields, a militia spokesperson said, as the battle continued with fighters who stayed behind.

The US-backed Syrian Democratic Forces (SDF), an alliance of Kurdish and Arab militias, said foreign fighters were not included under the withdrawal deal.

However, a member of the Raqqa Civil Council said that some ISIL foreigners did manage the leave with the Syrian ISIL group as they left their self-proclaimed capital in the country's north.

The ISIL fighters took about 400 civilians with them as human shields, according to the SDF.

Omar Alloush, a member of the Raqqa Civil Council, would not say how many fighters remained in the city, where the Syrian Democratic Forces have hemmed them into a small enclave.

Talal Silo, another spokesperson for the SDF, said ISIL fighters who remained in the city would have to "surrender or die".

The SDF on Sunday announced the "final phase" of the battle, saying its fighters had begun the operation to capture the last 10 percent of the city under ISIL control.

ISIL's defeat at Raqqa would be a milestone in efforts to roll back the "caliphate" the group declared in 2014 in Syria and Iraq, where earlier this year it was driven from the major northern city of Mosul.

The group captured Raqqa in 2014, the first city to fall under its full control. Raqqa became synonymous with the worst of ISIL's abuses, and infamous as a centre for planning attacks abroad.

Tribal leaders' statement

The latest battle for Raqqa began in June, with heavy street-by-street fighting amid intense US-led coalition air raids and shelling. The battle has dragged on in the face of stiff resistance from ISIL.

The Kurdish YPG militia, which dominates the SDF, said on Saturday that ISIL was on the verge of defeat in Raqqa, and the city may be cleared of the group's fighters latest on Sunday.

Local tribal leaders issued a statement late on Saturday saying they had urged the SDF and US-led coalition to find a way to "settle the status" of Syrian ISIL fighters in the city and "secure their exit".

The SDF agreed and prepared the mechanism to evacuate (them) "to protect the lives of civilians who were taken as human shields," the statement added.

"We as tribal leaders guarantee the lives of those who will be taken out."

The US-led coalition backing the SDF earlier announced a convoy would leave Raqqa on Saturday under a deal negotiated by local officials.

"The arrangement is designed to minimise civilian casualties and purportedly excludes foreign Daesh terrorists as people trapped in the city continue to flee the impending fall of Daesh's so-called capital," the coalition said, using the Arabic acronym for ISIL.

"People departing Raqqa under the arrangement are subject to search and screening by Syrian Democratic Forces," it added.

READ MORE: What is left of ISIL in Iraq?

ISIL now holds just a sliver of territory in Iraq, and is under attack from two separate campaigns by the SDF and the Syrian army and its allies in Deir Az Zor province.

On Saturday, Syria's army seized the former ISIL stronghold of al-Mayadeen in Deir Az Zor, in a campaign that is backed by President Bashar al-Assad's ally Russia.