Syrian ISIL fighters are set to evacuate their former stronghold of Raqqa in a withdrawal negotiated by local officials and tribesmen, as US-backed forces near the capture of the city.

Officials on Saturday gave conflicting accounts on whether the group's foreign fighters would also be leaving the city, where the US-backed Syrian Democratic Forces (SDF) have been battling to defeat the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) group since June.

Talal Silo, spokesman for the SDF, an alliance of Kurdish and Arab fighters, said ISIL's foreign fighters would be left behind "to surrender or die", without saying when the evacuation of Syrian fighters would take place.

A US-led coalition battling ISIL in Syria and Iraq specifically ruled out the exit of foreign fighters, while making no mention of local fighters. It also warned against any deal that allowed ISIL fighters safe passage without "facing justice".

But Omar Alloush, a member of Raqqa's Civil Council, said the evacuation would include foreign fighters. He said it would take place overnight into Sunday. The ISIL fighters would be taking some 400 civilians with them as human shields, he said.

"For many SDF commanders, whether the foreign fighters leave in the coming hours or not, they are confident that the full control of the city is just a matter of few hours," Al Jazeera's Hashem Ahelbarra, reporting from Antakya, near the Turkey- Syria border, said.

"They say that they could officially enter [and capture] Raqqa tonight."

ISIL's final 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, told earlier on Saturday that ISIL was on the verge of defeat in Raqqa, and the city may be cleared of the group's fighters on Saturday or 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 Syrian Democratic Forces agreed. We are now preparing a 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.