Delegates at a UN climate conference in Paris have approved a draft text they hope will form the basis of an agreement to curb global carbon emissions.
The 48-page document will be discussed by ministers on Monday (local time).
They will try to arrive at a comprehensive settlement by the end of next week.
The French climate ambassador warned that major political differences still needed to be resolved.
Delegates from 195 countries worked through the night (Friday overnight local time) at a conference centre in Le Bourget, conscious of a midday Saturday deadline imposed by the French presidency of this meeting.
The weighty document will now go forward to ministers who will have to take the many political decisions still required, if the text is to be turned into a long-term agreement.
"Nothing has been decided and nothing will be left behind," said French climate ambassador Laurence Tubiana.
"This text marks the will of all to reach an agreement. We are not at the end of the route. Major political issues are yet to be resolved," she warned.
Many delegates were relieved that they had at least reached this point, as it marked a critical point after four years of negotiations.
The document laid out a range of options for ministers on what the long-term goal of the deal should be, as well as the scale and the methods of raising climate finance for poorer nations.
Among the many tricky issues they will have to deal with is differentiation: many countries are reluctant to change the way that nations are divided into developed and developing, based on where they were in 1992, when the UN Convention was signed.
Many richer countries want this to change, and want a greater number of emerging economies to take on emissions reduction targets and become climate finance donors.
South Africa's climate ambassador struck a note of warning on this issue.
"The Paris outcome must be under the convention and in accordance with its principles and provisions and must not rewrite or re-interpret its decisions," said Nozipho Mxakato-Diseko, who speaks on behalf of more than 130 developing nations.
Negotiators had hoped to be much further forward at the end of the week. They started out with a 50-page document and by Friday had reduced it to 36 pages of text.
"We now need to summon the political will needed to make the hard decisions required for an effective and durable agreement that protects the most vulnerable among us," said Thoriq Ibrahim of the Maldives and Chair of the Alliance of Small Island States.
Many countries had reservations about the Friday document, so what has now been agreed contains these concerns added as an annex - pushing the document to 48 pages.
There are worries that far too much has been left to ministers to agree, and that in an effort to reach a deal, too many compromises will be made.
"We're hoping that in the rush to the end, ministers do not trade ambition for expediency, and remain true to the science," warned Tasneem Essop from World Wide Fund for Nature.