Syria's army and key ally Russia on Thursday announced a nationwide ceasefire to take effect at midnight, in a major potential breakthrough after nearly six years of civil war.
The deal was brokered by Russia and Turkey, who back opposing sides in the brutal conflict, but notably does not involve Washington, which has negotiated previous ceasefires with Moscow.
It comes a week after the government recaptured second city Aleppo in a major blow to rebel forces.
Russian President Vladimir Putin announced the deal, saying Damascus and the "main forces of the armed opposition" had inked a truce and a document expressing a readiness to start peace talks.
"Several hours ago, the event occurred that we have not only been waiting for but been working so much to hasten," Putin said in a meeting with his defence and foreign ministers.
After the Kremlin's announcement, Syria's army said it would halt all military operations from midnight, and the opposition National Coalition also said it backed the truce.
Putin said he would also reduce Moscow's military contingent in Syria, which has been flying a bombing campaign in support of President Bashar al-Assad since last year.
The Kremlin strongman, however, said that Russia would continue to fight "terrorism" in the war-torn country and maintain its support for the government in Damascus.
Russian Defence Minister Sergei Shoigu said that seven opposition groups, including the powerful Ahrar al-Sham, had signed the deal and those who failed to adhere would be considered "terrorists".
Syria's army said the deal did not include the Islamic State (IS) militant group and the former Al-Qaeda affiliate previously known as Al-Nusra Front, now rebranded the Fateh al-Sham Front.
That could cause complications in areas like Idlib in northwestern Syria, where Fateh al-Sham is allied with rebel groups that have signed on to the deal.
Syria's political opposition and rebels confirmed their backing for the deal, saying it applied to all parts of the country.
"The agreement is for all of Syria and contains no exceptions or preconditions," said Osama Abou Zeid, a legal advisor to rebel groups fighting under the Free Syrian Army banner.
Ahmed Ramadan, a member of the National Coalition political opposition body, also said the deal covered Idlib, despite Fateh al-Sham's presence.
"The agreement includes a ceasefire in all areas held by the moderate opposition, or by the moderate opposition and elements from Fateh al-Sham, such as Idlib province," he told AFP.
The agreement comes after Turkey and Russia brokered a deal to allow the evacuation of tens of thousands of civilians and rebel fighters from Aleppo.
Moscow and Ankara are now pushing for peace talks between Damascus and the rebels to start soon in the capital of Kazakhstan, Astana.
"Now we need to do everything for these agreements to come into force, for them to work, so that the negotiating teams that have been or are being formed promptly and as soon as possible arrive in Astana," Putin said.
Russia and Turkey have both said that the peace talks they will supervise are meant to supplement UN-backed peace efforts, rather than replace them entirely.
Russian Foreign Minister Sergei Lavrov said that Russia, Turkey and Iran were currently organising for the talks and pressing for other key international players to get involved.
Lavrov said Moscow would invite Egypt and try to attract other regional powers such as Saudi Arabia, Qatar, Iraq and Jordan.
He added that Moscow would seek to involve US President-elect Donald Trump's administration once he takes office this month, but the process does not appear to involve outgoing President Barack Obama's administration.
Abou Zeid confirmed that the truce deal was intended to pave the way for new talks in Astana, with the High Negotiations Committee that has represented the opposition at previous negotiations expected to participate.
Turkey has long backed Syria's opposition, and its relations with Russia soured last year after Ankara shot down a Russian warplane.
But the two countries have worked closely of late on Syria and Turkey was conspicuously quiet as Assad's forces retook Aleppo.
The Kremlin said Putin and his Turkish counterpart Recep Tayyip Erdogan spoke Thursday and discussed the importance of efforts to convene the Astana talks.
Turkey's Dogan news agency, citing military sources, reported that Russian warplanes had for the first time bombed Islamist militant targets around the town of Al-Bab in Syria, held by IS extremists but surrounded by Turkish forces.
Syria's conflict began in 2011 with anti-government protests, but evolved into a complex civil war that has killed more than 310,000 people and forced millions from their homes.
In the hours before the ceasefire was to take effect, the Britain-based Syrian Observatory for Human Rights monitor reported at least 17 civilians, including six children, killed on in air strikes and artillery fire on rebel-held territory near Damascus.