The UN Security Council has unanimously adopted a resolution outlining a peace process in Syria.
The 15-member council reached rare agreement on the issue in a session in New York on Friday.
The resolution endorses talks between the Syrian government and opposition in early January, as well as a ceasefire.
The Syrian war, which is heading towards its fifth year, has killed more than 250,000 people and displaced millions more, the UN says.
However, disagreements remain over the future of Syrian President Bashar al-Assad.
The US, UK and France called for his departure, saying he had lost the ability to lead the country.
Russia and China, however, argued against a requirement for Mr Assad to leave power as a precondition for talks. The resolution itself makes no mention of his future role.
There is also disagreement over the definition of which armed groups fall within the remit of the ceasefire.
Analysis: Lyse Doucet, Chief International Correspondent
A stubborn gridlock in the UN Security Council has long blocked any step towards a political resolution of Syria's devastating war.
For years, everyone insisted there was no military solution. Nobody made much effort to achieve it.
The UN's first envoy Kofi Annan bitterly blamed the world body when he quit in 2012 after only one year in the job. His successor Lakhdar Brahimi frequently beseeched the Council to do more and often apologised to the Syrian people for failing them.
Now UN Envoy Staffan de Mistura is tasked with organising Syria talks. This unanimous vote is a crucial step forward. But the goal of "credible, inclusive and non-sectarian governance" within six months is hugely ambitious.
President Assad's supporters will welcome a UN resolution that does not mention his role. Russia's growing diplomatic and military weight in this conflict helped achieve that compromise. But, for the opposition and their allies, it will continue to be the issue that will block progress every step of the way.
US Secretary of State John Kerry, chairing the session, said the resolution sent "a clear message to all concerned that the time is now to stop the killing in Syria".
"The resolution we just reached is a milestone, because it sets specific goals and specific timeframes," he added.
The resolution calls for a ceasefire that should be implemented in parallel with the talks.
However, actions against groups considered terrorist organisations would not be affected. This would allow Russian, French and US air-strikes against Islamic State to continue.
UN Security Council Resolution on Syria (No. 2254)
- Calls for ceasefire and formal talks on a political transition to start in early January
- Groups seen as "terrorist", including Islamic State and al-Nusra Front, are excluded
- "Offensive and defensive actions" against such groups - a reference to air strikes by US-led coalition and Russia - to continue
- UN chief Ban Ki-moon to report by 18 January on how to monitor ceasefire
- "Credible, inclusive and non-sectarian governance" to be established within six months
- "Free and fair elections" under UN supervision to be held within 18 months
- Political transition should be Syrian-led
France's Foreign Minister Laurent Fabius welcomed the deal but said that the idea of Mr Assad standing in elections was "unacceptable".
One of the major sticking points so far has been which rebel groups should be considered terrorist outfits and consequently excluded from any talks or ceasefire.
The agreement demands that all parties cease attacks against civilians.
Russia, an ally of Mr Assad, has argued against his departure being a precondition for talks.