United Nations Security Council powers have unanimously approved a resolution endorsing a peace process for Syria including a ceasefire and talks between the Damascus government and the opposition - but with no mention of the most contentious issue: the future role of Syrian president Bashar Assad.
The resolution makes clear that the blueprint it endorses will not end the conflict, deep into its fifth year with well over 300,000 killed, because "terrorist groups" including Islamic State (IS) and the al Qaida-linked al-Nusra Front, are not part of the ceasefire.
US secretary of state John Kerry praised "the unprecedented degree of unity" in the security council, which has been deadlocked in the past over a political solution in Syria, and called the resolution "a milestone".
Foreign ministers from 17 countries debated for more than five hours on how to implement their call in Vienna last month for a ceasefire and the start of negotiations between the government and opposition in early January. At the same time, diplomats worked to overcome divisions on the text of the resolution.
The resulting agreement "gives the Syrian people a real choice, not between Assad and Daesh, but between war and peace," Mr Kerry said, using the Arabic acronym for the IS extremists.
"We're under no illusions about the obstacles that exist ... especially about the future of President Assad" where "sharp differences" remained, he said.
He said Assad must go if there was to be peace in Syria, stressing that "Assad has lost the ability ... to unite the country".
But Mr Kerry later said the United States and the opposition had eventually realised that demanding Assad's departure upfront in the process was "in fact, prolonging the war".
Mr Kerry, Russian foreign minister Sergey Lavrov and UN special envoy Staffan de Mistura made clear that the previously-envisaged January 1 start to peace talks was unlikely. Mr de Mistura said invitations to the talks will go out in January, at least.
Mr Kerry said a start to the talks in the middle or end of the month would be more reasonable. "In January, we expect to be at the table and implement a full ceasefire," he said.
UN secretary general Ban Ki-moon told the council that Syria was "in ruins", singling out besieged areas where "thousands of people have been forced to live on grass and weeds", which he called "outrageous".
"This marks a very important step on which we must build," he said of Friday's resolution.
But Syria's ambassador to the UN, Bashar Ja'afari, criticised the "glaring contradictions" between the talk about letting the Syrian people decide their fate and what he called interference in his country's sovereignty by talking about replacing Assad.
At an earlier ministerial meeting, Mr Ban said he urged the government and opposition to implement confidence-building measures, including a halt to the use of barrel bombs and other indiscriminate weapons against civilians, as well as granting unconditional access to aid convoys, lifting restrictions on the delivery of medical aid and releasing all detainees.
Ministers said they would meet again in January, and Mr de Mistura is now tasked with pulling together a final negotiating team for the Syrian opposition.
The resolution calls on the secretary general to convene representatives of the Syrian government and opposition "to engage in formal negotiations on a political transition process on an urgent basis, with a target of early January 2016 for the initiation of talks".
Within six months, the process should establish "credible, inclusive and non-sectarian governance" and set a schedule for drafting a new constitution. UN-supervised "free and fair elections" are to be held within 18 months under the new constitution.
The resolution calls the transition Syrian-led and Syrian-owned, stressing that the "Syrian people will decide the future of Syria".
The resolution also says ceasefire efforts should move forward in parallel with the talks, and it asks Mr Ban to report within a month on ways to monitor it.
Still, it notes that the ceasefire "will not apply to offensive or defensive actions" against IS and al-Nusra Front. This means that air strikes by Russia, France and the US-led coalition would apparently not be affected, nor would military action by the extremists.
Jordanian foreign minister Nasser Judeh said he presented lists submitted from each country of groups they considered terrorist organisations. He said some countries "sent 10, 15, 20 names" and others more.
A group of countries will join Jordan in developing that list, Mr Kerry said.
Mr Lavrov stressed that "terrorists of all stripes have no place in the talks" and said: "It is inadmissible to divide terrorists among good and bad ones."
Those around the table included the United States, key European nations and Saudi Arabia, which supports the Syrian opposition, and the Assad government's top allies, Russia and Iran.
Chinese foreign minister Wang Yi said the two most important issues were launching political negotiations among Syrian parties and implementing a UN-monitored ceasefire.
"Without peace talks, the ceasefire cannot be sustained. Without a ceasefire, peace talks cannot continue to produce results," he said.
The peace plan agreed in Vienna last month by 17 nations as well as the UN, European Union, Arab League and Organisation of Islamic Co-operation sets a January 1 deadline for the start of negotiations between Assad's government and opposition groups.
The UN representative for the Syrian National Coalition, the main Western-backed opposition group, said a comprehensive solution to the conflict required "the removal of all foreign troops from Syria, all of them", including Russia.
Moscow began a campaign of air strikes in September that have focused on more moderate forces fighting Assad in areas where IS has little or no presence.