A core group of world leaders clinched a draft accord for rolling back climate change after gruelling talks in Copenhagen, but campaigners early Saturday branded the new-born deal a betrayal.
US President Barack Obama said an "unprecedented breakthrough" had been reached among day-long meetings involving about two dozen presidents and prime ministers gathered in Copenhagen.
Obama admitted the so-called Copenhagen Accord did not go far enough, but characterised its provisions as "meaningful," arguing they provided a tool for ratcheting up action on greenhouse gases.
Copenhagen's Bella Center crackled with nervous tension, exhaustion and confusion as leaders raced from one closed-doors huddle to another, arguing over legalistic chunks of text in an extraordinary game of climate poker.
Negotiators were grey-faced after more than 12 days of battling over text, and over-stressed journalists became feral in their quest for information.
Yet as the conference lurched into its 13th day, it was still unclear whether the much-trumpeted deal had a future.
It still had to gain approval from a plenary session here of the 194 members of the UN Framework Convention on Climate Change (UNFCCC).
They include African countries and small island nations most at risk from the warmer Earth's temperatures that bring rising sea levels and the risk of more droughts, storms and floods.
"Today's events really represent the worst developments in climate change negotiations in history," said Lumumba Stanislas Dia-ping of Sudan, chairing the Group of 77 and China bloc of 130 poor nations.
The agreement set a commitment to limit global warming to two degrees Celsius (3.6 Fahrenheit), but did not spell out the important stepping stones - global emissions targets for 2020 or 2050 - for getting there.
Nor did it spell out a year by which emissions should peak, a demand made by rich countries that was fiercely opposed by China, or insist on tough compliance mechanisms to ensure nations honoured their promises.
Somewhat more successfully, it spelt out some details for how poor countries should be financially aided to shore up their defences against rising seas, water stress, floods and storms.
Rich countries pledged to commit 30 billion dollars in "short-track" finance for the 2010-2012 period, including 11 billion from Japan, 10.6 billion from the European Union and 3.6 billion dollars from the United States.
They also set a goal of "jointly mobilising" 100 billion dollars by 2020, although details were sketchy.
The US president said before leaving Copenhagen that what had been billed as one the most important summits since World War II would be the starting gun for a much stronger effort to combat global warming.
"Today we have made a meaningful and unprecedented breakthrough here in Copenhagen," Obama told reporters.
"For the first time in history, all major economies have come together to accept their responsibility to take action to confront the threat of climate change."
He added: "Going forward, we are going to have to build on the momentum we have achieved here in Copenhagen. We have come a long way but we have much further to go."
French President Nicolas Sarkozy said the deal was the only one that could be reached after the summit had revealed deep rifts between rich and poor countries, and within those two blocs themselves.
"The agreement is not perfect but it's the best one possible," Sarkozy told reporters, adding that another global warming summit would be hosted by Germany in mid-2010.
German Chancellor Angela Merkel admitted she viewed the result "with mixed emotions.
"There is light and there is shadow... The only alternative to the agreement would have been a failure."
The deal was hammered out in talks between Obama and the leaders of China, India, Brazil and South Africa as well as key European countries, diplomats said.
There was no immediate word on Russia's stance. President Dmitry Medvedev was one of the first to leave Copenhagen, having voiced frustration at the negotiation process overseen by the Danish government.
Australian Prime Minister Kevin Rudd said that talks had been close to collapse on seven occasions, but were ultimately saved by sharp deal-making in which Obama played a lead role.
China had bristled at anything called "verification" of its plan to cut the intensity of its carbon emissions, seeing it as an infringement of sovereignty and saying that rich nations bore primary responsibility for global warming.
Disagreements between the China and United States - the world's No. 1 and 2 carbon polluters - had been at the core of the divisions holding up a deal.
The emergence of a deal came at the end of a day in which several draft agreements were knocked back, with leaders themselves taking over the task of redrafting the exact wording of three pages of text.
Different versions of the document showed the leaders particularly split over whether to fix a firm date for finalising a legally binding treaty in 2010, and a commitment to slashing global carbon emissions in half by 2050.
The agreement was met with dismay by campaigners, who said it was weak, non-binding and sold out the poor.
"By delaying action, rich countries have condemned millions of the world's poorest people to hunger, suffering and loss of life as climate change accelerates," said Nnimmo Bassey, chair of Friends of the Earth International, calling the outcome "an abject failure".
"The blame for this disastrous outcome is squarely on the developed nations."
Antonio Hill of Oxfam charged: "It can't even be called a deal. It has no deadline for an agreement in 2010 and there is no certainty that it will be a legally binding agreement."
"The so-called Copenhagen accord is an historic failure, representing the collapse of international efforts to sign a binding global treaty that can stop catastrophic climate change," said the US group Avaaz.org.
"The accord is far from fair, barely binding, and absolutely unambitious."
Greenpeace International Executive Director Kumi Naidoo said: "The city of Copenhagen is a climate crime scene tonight, with the guilty men and women fleeing to the airport in shame.
"World leaders had a once in a generation chance to change the world for good, to avert catastrophic climate change. In the end they produced a poor deal full of loopholes big enough to fly Air Force One through."Reuse content