An agreement has been reached to evacuate the second of three pockets held by opposition fighters east of the Syrian capital Damascus, state media and the armed opposition group said.
It comes hours after the main rebel group in the area declared a ceasefire to give negotiations with the Russians and the Syrian government a chance.
Shortly before the ceasefire went into effect at midnight on Thursday, intense government attacks killed at least 37 people in an underground shelter, prompting the truce and later the agreement between the Faylaq al-Rahman rebel group and the government to evacuate the area.
Friday's agreement will mean the surrender of the second of three pockets in eastern Ghouta, where rebels have been holding out over the past few years.
On Thursday hundreds streamed out of Harasta, the first pocket, after a similar negotiated ceasefire and evacuation of armed fighters and civilians.
Faylaq al-Rahman, which controls the second pocket, asked for the latest ceasefire after the intensified assault on territories it controls.
The group, the second most powerful in eastern Ghouta, said in a statement that it reached an agreement with the Russians over areas it controls in eastern Ghouta.
It added that the deal will lead to the immediate evacuation of sick and wounded people for treatment and allow aid to enter the besieged area.
The group added that opposition fighters and their relatives who decide to leave eastern Ghouta will head to rebel-held parts of northern Syria while civilians who decide to stay will be guaranteed safety.
It said that Russian military police will deploy in Faylaq al-Rahman-controlled areas, including the suburbs of Arbeen, Zamalka, Ein Tarma and Jobar.
A prisoner exchange will take place between the group and the government, the group added.
Rabieh Dibeh, correspondent for state-affiliated al-Ikhbariya TV, said 7,000 civilians and Faylaq al-Rahman fighters will begin leaving the four suburbs as early as Saturday.
The Britain-based Syrian Observatory for Human Rights said it is not clear whether Faylaq al-Rahman members will head to the rebel-held north-western province of Idlib or to northern regions controlled by Turkish troops and Turkey-backed opposition fighters.
In the worst violence on Thursday, a single air strike hit the shelter in the town of Arbeen, where dozens of residents were taking refuge.
Rescue teams, known as the White Helmets, said 37 people were killed.
Another medical group that supports health facilities operating in the area, the Syrian American Medical Society, put the toll at 47, saying many of them were burned to death and that the number was likely to rise.
The strike came as government ground forces advanced into the town of Hazeh, south of Arbeen, the observatory reported.
A similar deal with another rebel group, Ahrar al-Sham, led to the evacuation of hundreds of fighters and civilians from Harasta, an eastern Ghouta town in the north.
The Russian defence ministry said in a statement on Friday that 1,895 rebels and their family members left the town of Harasta on Thursday.
They headed to the north-western Idlib province, one of a few remaining areas in the hands of the opposition.
Syrian state-run Al-Ikhbariya TV broadcast from the Harasta crossing area on Friday, saying that a convoy of 32 buses carrying more than 2,061 people, including 671 Ahrar al-Sham fighters, was getting ready to leave on Friday night.
The evacuation deal and territory surrender came after a long siege and bombing campaign of the enclave just miles outside of Damascus.
Rebels had controlled eastern Ghouta since 2012, keeping the farming area a thorn in the government's side during the years of conflict.
The government imposed a siege on the area shortly after rebels controlled it, but failed to recapture eastern Ghouta.
The deal with Ahrar al-Sham in Harasta is likely to serve as a blueprint for the talks with Faylaq al-Rahman rebels.
In February, a concerted military offensive, backed by Russian air strikes, squeezed the rebels and civilians in the area under an intense bombing campaign and tightened the siege.
The UN estimated that nearly 400,000 people remained in the enclave before the latest offensive began.
The government assault triggered a mass movement of people trying to escape the violence in the Damascus suburbs.
Some have moved deeper into the rebel-held enclave, while about 50,000 others have crossed the front lines towards government-controlled areas.
Over the last weeks, ground troops have cut the enclave into three areas, isolating them and keeping up the bombing.
On Friday, Syrian state media said more residents have left from Douma, one of the three pockets isolated by the offensive and where the bombing continues, through a crossing linking it to the capital Damascus.
No ceasefire has been reached in Douma, the largest town in eastern Ghouta.
Douma is controlled by the Army of Islam, the largest and most powerful rebel group in the region.
The government-controlled Central Military Media reported that rebels in Douma will release 3,500 people they are holding in return for allowing 3,000 "humanitarian cases" to be evacuated from the area.
It did not elaborate but said it is part of an agreement between the government and rebels in Douma.
Al-Ikhbariya TV broadcast images on Friday of hundreds of men, women and children streaming out on foot from the Wafideen crossing that links the rebel-controlled town of Douma to Damascus.
Syrian state news agency SANA said more than 4,000 left on Friday.
State media said more than 6,000 left the day before.
Syrian rescue workers said Douma had come under intense air strikes, counting at least 30 since late on Thursday.
Activists claimed incendiary bombs were used, as videos showed dark skies light up with white smoke and multiple fires raging on the ground.