The dramatic developments, which appeared to restore the remainder of what was once Syria's largest city to President Bashar Assad's forces after months of heavy fighting and a crippling siege, followed reports of mass killings by government forces closing in on the final few blocks still held by the rebels.
Damascus confirmed the evacuation deal and the U.N. envoy for Syria, Staffan de Mistura, called for immediate access to the former rebel enclave to confirm the end of military operations and to oversee the safe departure of tens of thousands of civilians and opposition fighters. He was at the Security Council where an emergency meeting for Aleppo was underway.
Russia's U.N. ambassador Vitaly Churkin took to the floor near the end of the session at the U.N. Security Council to announce fighting had ended.
"According to the latest information that we received ... military actions in eastern Aleppo are over," Churkin said. "The Syrian government has re-established control over eastern Aleppo."
Minutes earlier, he had announced that "all militants" and members of their families, as well as those wounded in the fighting, were being evacuated through "agreed corridors in directions that they have chosen voluntarily," including the rebel stronghold of Idlib province.
As word spread of the deal, celebrations broke out in the government-controlled western sector of Aleppo, with convoys of cars driving around honking their cars and waving Syrian flags from the windows.
Retaking Aleppo, which has been split between rebel and government control since 2012, would be Assad's biggest victory yet in the civil war. Aleppo, the country's former commercial powerhouse, has long been regarded as a major gateway between Turkey and Syria and the biggest prize in the conflict.
The agreement Tuesday came after world leaders and aid agencies issued dramatic appeals on behalf of trapped residents, and the U.N. human rights office said that pro-government forces reportedly killed 82 civilians as they closed in on the last remaining rebel areas.
That and other reports of mass killings, which could not be independently confirmed, reinforced fears of atrocities in the final hours of the battle for the city.
U.N. Secretary-General Ban Ki-moon told the emergency meeting he had received "credible reports" of civilians killed by intense bombing and summary executions by pro-government forces.
"To the Assad regime, Russia and Iran -three member states behind the conquest of and carnage in Aleppo - you bear responsibility for these atrocities," said U.S. Ambassador Samantha Power.
In Turkey, hundreds of protesters gathered outside the Russian consulate in Istanbul, chanting against Russia's involvement in the push to retake rebel-held areas of Aleppo.
Several residents and opposition activists in Syria told the AP that government forces carried out summary killings of rebels in neighborhoods captured on Monday, but the Syrian military denied the claim, saying such allegations were "a desperate attempt" to gain international sympathy.
None of the residents witnessed the alleged killings, and the reports came amid deepening chaos in the remaining rebel-held areas. Mohammed Abu Rajab, the administrator of the last remaining clinic in rebel-held parts of the city, said the dead and wounded were being left in the streets.
Bashar al-Ja'afari, Syria's ambassador to the United Nations, denied any mass executions or revenge attacks, but added it was Syria's "constitutional right" to go after "terrorists," a reference to all opposition fighters.
"Aleppo has been liberated from terrorists and those who toyed with terrorism," he said. "Aleppo has returned to the nation."
The U.N. children's agency said in a statement that it had received a report of more than 100 unaccompanied children trapped in a building under fire in eastern Aleppo. UNICEF is concerned over reports of "extrajudicial killings of civilians, including children," said the agency's regional director, Geert Cappalaere.
The U.N. human rights office said it had received reports of pro-government forces killing at least 82 civilians in four neighborhoods of the rapidly-shrinking rebel enclave, including 11 women and 13 children.
Spokesman Rupert Colville, speaking to reporters in Geneva, said the reports described pro-government forces entering homes and killing civilians "on the spot."
A news release by the U.N. human rights office in Geneva said that multiple sources reported dozens of civilians were shot dead Monday by government forces and allied militiamen in the Kallaseh and Bustan al-Qasr neighborhoods of eastern Aleppo.
Rami Abdurrahman of the Britain-based Syrian Observatory for Human Rights said hundreds of bodies were still under the rubble.
There were conflicting reports about the timing and route of the rebel withdrawal.
Syria's military media said the gunmen would be evacuated through the Ramouseh crossing and from there to rebel-controlled areas of northern Idlib province.
"Aleppo will be declared a secure and liberated city within the coming hours," it said on its Telegram channel.
Osama Abu Zayd, a Turkey-based legal adviser for an umbrella group of rebel factions known as the Free Syrian Army, said the cease-fire went into effect Tuesday evening and that the first groups of rebel fighters would begin evacuating later that day.
Yasser al-Youssef, a rebel spokesman, confirmed the deal, and another spokesman, Ahmed Karali, said those leaving the city would head to rural areas in western Aleppo province then head north.
A government win in Aleppo would significantly strengthen Assad's hand but does not end the conflict - significant parts of Syria are still outside government control and huge swaths of the country are a devastated wasteland. More than a quarter of a million people have been killed since the conflict began in 2011 with peaceful protests against the Assad family's four-decade rule.
Associated Press Zeina Karam reported this story from Beirut and AP writer Edith M. Lederer reported from the United Nations. APress writers Jamey Keaten in Geneva, Sarah El Deeb and Philip Issa in Beirut, and Vladimir Isachenkov in Moscow contributed to this report.
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.