The last rebels were set to leave Syria's battleground city of Homs on Friday, handing a symbolic victory to President Bashar al-Assad in what was once dubbed the capital of the revolution.
For two years the rebels fought to keep besieging government forces at bay, but Assad's troops were to cement their control of the city in the bloody civil war that has gripped the country for more than three years.
On Thursday, around 1,000 rebels left the Old City of Homs under the unprecedented negotiated evacuation that began a day before, according to figures given to AFP by provincial governor Talal Barazi.
In the regime-held Khaldiyeh district adjacent to the Old City, the final 250 rebels were waiting to be avacuated Friday to Dar al-Kabira 20 kilometres (13 miles) to the north, in an operation originally due to have been completed by late Thursday.
"Over the next few hours, we'll resolve logistical problems and complete the operation so they can get to their destination," Barazi told AFP on Friday.
"They slept in the buses or beside them, and we have taken them food, drinks and cigarettes," he added.
At least 1,630 people, mostly rebels, have left the Old City since Wednesday under the deal reached between the regime and the insurgents.
The pullout leaves the rebels confined to a single district on the outskirts of a city that what was once a bastion of the uprising.
Barazi said negotiations were well advanced for the rebels to leave that neighbourhood too in the coming weeks.
It is the first retreat by rebels from a major Syrian city since the uprising erupted more than three years ago.
The Syrian Observatory for Human Rights said the hold-up in the evacuation was caused by Islamist rebel groups that were not party to the agreement.
The Britain-based watchdog said these groups wanted to limit the delivery of supplies to Zahra and Nabol, two Shiite towns surrounded by rebels in the northern province of Aleppo, to two truckloads instead of the agreed 12.
The Homs deal is not the first between the government and the rebels -- a number of ceasefires have been agreed on the outskirts of Damascus.
But it is the first time that rebels have withdrawn from an area they controlled under an accord with the government.
Nealy 2,000 people were killed in Homs during two years under siege, the Observatory estimates.
Under the accord, the government allowed the remaining rebels to withdraw with their personal weapons in return for the release of 40 Alawite women and children, an Iranian woman and 30 soldiers held hostage by rebels elsewhere, a rebel spokesman said.
The Observatory confirmed that all the hostages had been released by Thursday afternoon.