IN a faltering step that nearly all concede is too little to avert a climate crisis, the majority of world leaders will adopt the first international agreement that recognises global warming must stay below two degrees to avoid dangerous climate change.
Despite the deep disappointment of many who helped create it, the Copenhagen accord will stand as a first attempt to bring the biggest greenhouse gas polluting nations, the United States and China, into a political deal to curb soaring global emissions.
By the end of next month, rich nations, including Australia, must lodge their 2020 targets to cut emissions under the accord while the big emerging polluters, including China, India, Brazil and Indonesia, have agreed to list the voluntary measures to curb theirs.
''We have sealed the deal,'' the United Nations Secretary-General, Ban Ki-moon, said. ''This accord cannot be everything that everyone hoped for, but it is an essential beginning.''
The accord was formally recognised by the UN conference in Copenhagen in its closing session even as some of its smaller members condemned its lack of ambition - if unchanged, it will leave the world on a path to warming at least three degrees.
The deal was struck after a marathon round of negotiations between 26 world leaders, including the Prime Minister, Kevin Rudd, which almost collapsed several times as it was progressively watered down by China and the US.
The exhaustion on the faces of the European leaders was matched by the disappointment when they finally faced the media at 2am on Saturday. The Swedish Prime Minister, Fredrik Reinfeldt, acting as President of the European Union, and Jose Manuel Barroso, President of the European Commission, had just given their grudging agreement to the flimsy document, just several pages long, that was supposed to guide the world in its fight against climate change.
''Let's be honest and say that this is not a perfect agreement. It will not solve the climate threat,'' Mr Reinfeldt said as the last draft of the accord was running off the photocopiers.
He admitted that throughout the long day and night all hope of an ambitious politically binding agreement had been crushed by China and the US. ''We have been fighting not to go backwards,'' he said.
Yet in those early hours of Saturday, the Europeans, along with Mr Rudd and his British counterpart, Gordon Brown, faced the media one after the other to defend the accord that environmental groups and many small, vulnerable nations were calling a catastrophe.
''This represents a significant global agreement,'' Mr Rudd insisted. His Climate Change Minister, Penny Wong, stood beside him looking shattered, whether from exhaustion, disappointment or a combination of both was unclear. By then, Senator Wong had been in negotiations for 24 hours, working through the gritty details of the deal.
Mr Rudd had to acknowledge the accord's obvious flaw: the emissions cuts promised in the document, even at their most ambitious, failed to match the promise of avoiding dangerous climate change.
''A huge amount of work still remains to be done,'' he conceded. ''But the alternative, which we confronted, staring into the abyss at midnight last night, [was] these negotiations collapsing altogether and throwing back all progress that has been reached in recent times in global climate change action.''
Almost two hours earlier, before Mr Rudd, Mr Brown and the Europeans had emerged from their final leaders' meeting, the US President, Barack Obama, had announced the accord to the travelling White House press corps as he prepared to fly out of Copenhagen.
A reporter queried the President's departure before the draft was finalised. ''Does it require signing, is it that kind of agreement?'' The President replied vaguely: ''You know, it raises an interesting question as to whether technically there's actually a signature - since, as I said, it's not a legally binding agreement, I don't know what the protocols are.''
But Mr Obama quickly added: ''I do think that this is a commitment that we, as the United States, are making and that we think is very important.'' Then he raised his hands. ''All right. Thanks, guys.'' And briskly he left for Air Force One.
Mr Obama had been in Copenhagen for less than 14 hours.
In that time, he had done a deal with the Chinese Premier, Wen Jiabao, that steamrolled over the UN climate negotiations. The US and China had wrested control of the strategic decision-making from the Europeans. Any future climate change agreements will be dictated by their joint level of ambition.
After almost two weeks of debate, where minister after minister, and leader after leader, had spoken passionately about the threat facing the planet, after all the mass protests, the pleas, the prayers and the promises, what had emerged was not ''the grand bargain'' called for by Mr Rudd, but the weak compromise so many had predicted.
The Copenhagen accord lacks legal force. In the last hours of the conference on Saturday, nations agreed only to ''take note'' of the agreement.
The accord has one big promise: to keep the global temperature from rising by more than two degrees. But the fine print shows clearly that as it stands, the accord keeps the world on a path that will lead to a warming of at least three degrees.
This, according to the UN's scientific body, will lead to catastrophic consequences this century for many nations, from Bangladesh to Australia.
As Mr Reinfeldt explained to the bleary-eyed reporters, rich
countries were supposed to come to Copenhagen with pledges on the table to cut their emissions from 1990 levels between 25 and 40 per cent by 2020. They did not. What is on offer is a group cut of only 18 per cent. Dragging down the numbers, Mr Reinfeldt said, is the US. Bound by bills before the US Senate, Mr Obama would not move beyond pledging a cut of about 3 per cent on 1990 levels.
The Europeans agreed to the weak outcome largely because of one breakthrough: for the first time, the US, with China, India, Brazil, South Africa, Indonesia, Mexico, South Africa, South Korea and Singapore have put on paper measures to curb emissions.
But those 2020 commitments are now likely to be at the lower level of ambition. Mr Rudd's promise of a 25 per cent cut to Australia's emissions is conditional on an ambitious deal. He will now feel justified in putting up a target of 10 to 15 per cent.
China, who repeatedly blocked negotiations, promised to curb its emissions, but will be limited by economic growth - and so they could continue to soar.
The Europeans' concerns were compounded after Mr Wen argued to remove a clause calling for global emissions to be halved by 2050 - the formula based on the advice of the UN's peak scientific body, the Intergovernmental Panel on Climate Change. ''How can we reach the two degrees if we can't agree on a long-term target?'' Mr Barroso asked.
Mr Obama faced criticism from the Europeans over the lack of a long-term target in the accord or pledges to achieve it. But he insisted the accord was a first step. ''There are going to be those who are going to look at the national commitments, tally them up and say, you know, the science dictates that even more needs to be done,'' he said.
''The challenge here was that for a lot of countries, particularly those emerging countries that are still in different stages of development, this is going to be the first time in which even voluntarily they offered up mitigation targets. And I think that it was important to essentially get that shift in orientation moving. That's what I think will end up being most significant about this accord.''
Mr Obama's determination to have China, India and Brazil in an agreement, however weak, overrode the resistance of the Europeans. The deal was struck after critical meetings. Mr Obama and Mr Wen met twice behind closed doors after each publicly staked their positions.
The US-China meeting was then expanded to include the leaders of India, Brazil and South Africa. ''That's where we agreed to list our national actions and commitments,'' Mr Obama said. ''We agreed to set a mitigation target to limit warming to no more than two degrees Celsius, and importantly, to take action to meet this objective consistent with science.''
But what Mr Obama ditched was any promise for a legally binding treaty as the next crucial step. The Europeans had argued such a treaty needed to be signed within six months, a year at the latest, when the UN climate conference meets in Mexico. Asked if that was possible, Mr Obama said: ''I think it is going to be very hard and it's going to take some time.''
This was a big defeat for Australia, Europe and Japan who, unlike the US, have ratified the only current legally binding climate treaty, the Kyoto Protocol. Under Kyoto, rich industrialised nations must cut their emissions. A strategy behind Copenhagen was to get a deal that would lead to replacing the Kyoto Protocol with a single treaty for all nations, especially the US and China.
But China, India and Brazil along with virtually all the key developing nations brought the summit to a standstill over this issue, refusing to accept any proposal they said would ''kill Kyoto''.
The accord has been criticised by environmental groups, small island states and the least developed nations, who said two degrees of warming would condemn much of Africa and the low-lying islands to disaster.
They mounted a strong case for a limit of 1.5 degrees - ''1.5 to stay alive''. The clause to examine this target was taken out of the final text. But, critically, what remains is a promised review in line with the science by 2015, after the next report of the UN's scientific body, the Intergovernmental Panel on Climate Change.
But despite all the criticism, the last two weeks cannot be seen simply as a failure. For all its many flaws, the summit brought together 119 world leaders who acknowledged for the first time that climate change is one of the greatest economic and security challenges facing the planet.
From the President of the US to the President of the Maldives, virtually almost every leader recognised their economies would be forced to undergo a clean energy revolution within the next few decades.
One of the most telling revelations came not on the floor of the conference but in a briefing from the US senator John Kerry, who is trying to shepherd climate change laws through the Senate.
Asked why anyone would believe the US would pass these bills next year given the level of scepticism in America, he hit back. The state of North Carolina, he said, has just announced it is shutting down 11 coal-fired power plants. South Carolina is refusing to build another one.
America is already moving, he said. He was not worried about its initial 2020 target being seen as too weak: ''We will eclipse it dramatically.''