A deal has been reached to allow rebel fighters and civilians to leave the Syrian town of Darayya, which has been under government siege since 2012.
The evacuation of the town, near the capital Damascus, is expected to begin on Friday. Syrian Red Crescent vehicles are poised to enter the town.
Residents have faced near-constant bombardment and shortages of food, water and power.
Civilians received their first supplies in four years only in June.
It comes as US Secretary of State John Kerry holds talks on Syria with his Russian counterpart Sergei Lavrov in Geneva.
They are meeting in a bid to broker a temporary ceasefire in the city of Aleppo, where fighting between government and rebel forces has escalated in recent weeks, leaving hundreds dead.
Under the terms of the Darayya deal, 700 armed men will leave for the rebel-controlled city of Idlib while 4,000 civilians will move to government shelters, Syrian state media report.
The office of UN Special Envoy Staffan de Mistura issued a statement saying it was "imperative that people of Darayya are protected in any evacuation that takes place, and that this takes place voluntarily".
At the scene: Assaf Abboud, BBC Arabic Service, outside Darayya
We are at Darayya main entrance near al-Basil roundabout. This area is just 7km (5 miles) from the Syrian capital, Damascus.
Buses and ambulances are on standby to start the evacuation. We are now waiting for the green light to begin the implementation of the operation as agreed by the two sides.
Darayya has a strategic position - given its proximity to Daraa Road, it is not far from the capital and from the Mazzeh military airport, too. The armed opposition had used the town as a connection hub between western and eastern Ghouta, Damascus.
Darayya saw some of the first protests against the Syrian government, an uprising that transformed into a full-blown civil conflict.
The withdrawal of the rebels only a few miles from Damascus is a boost for President Bashar al-Assad, analysts say.
"We are being forced to leave, but our condition has deteriorated to the point of being unbearable," Hussam Ayash, an activist in the town, told the Associated Press news agency.
"We withstood for four years but we couldn't any longer."
Meanwhile a monitoring group said 11 children had been killed in a barrel bomb attack by government forces in a rebel-held neighbourhood of Aleppo.
They were among 15 people killed in the incident, the Syrian Observatory for Human Rights said.
Determined diplomacy: analysis by Lyse Doucet, BBC News, Geneva
Russian and American teams in Geneva, involving military officials and diplomats, have been able to reach agreement on most details of a possible deal. It is up to John Kerry and Sergei Lavrov to try to close the last difficult gaps. One of the most sensitive issues is said to be the grounding of Syria's warplanes.
Western sources say senior US defence officials are deeply sceptical, if not resistant, to closer military co-operation with Moscow. But achieving progress in Syria, especially in the battle against so-called Islamic State, is one of the White House's key goals. So John Kerry continues his determined diplomacy to reach some kind of deal with Russia.
But today's evacuation in Darayya which involves the surrender of rebel forces, underlines the Syrian government's long-held view that the road to peace goes through local Syrian deals, largely on its terms.
The UN said Russia, which has been supporting the Syrian government in its offensives, had agreed to a 48-hour pause in Aleppo to allow in much-needed aid.
But the organisation added it was still waiting for agreement from other parties fighting on the ground.
In another development, the US urged "strong and swift action" after a UN investigation concluded that Syria had used chemical weapons against its own people.