Image caption The Kyoto protocol on climate change had been due to expire later this year

UN climate talks in Doha have closed with a historic shift in principle but few genuine cuts in greenhouse gases.

The summit established for the first time that rich nations should move towards compensating poor nations for losses due to climate change.

Developing nations hailed it as a breakthrough, but condemned the gulf between the science of climate change and political attempts to tackle it.

The deal, agreed by nearly 200 nations, extends to 2020 the Kyoto Protocol.

It is the only legally-binding plan for combating global warming.

The deal covers Europe and Australia, whose share of world greenhouse gas emissions is less than 15%.

This is a watershed in the talks. There is no turning back from this Saleem ul-Huq, IIED think-tank, Bangladesh

But the conference also cleared the way for the Kyoto protocol to be replaced by a new treaty binding all rich and poor nations together by 2015 to tackle climate change.

The final text "encourages" rich nations to mobilise at least $10bn (£6bn) a year up to 2020, when the new global climate agreement is due to kick in.

Final turmoil

There was last-minute drama as the talks were thrown into turmoil by the insistence of Russia, Ukraine and Belarus that they should be allowed extra credit for the emissions cuts they made when their industries collapsed.

After a long delay, the chairman lost patience, re-started the meeting and gavelled through the agenda so fast there was no chance for Russia to object.

A cheer exploded into prolonged applause. Russia bitterly objected at what it said was a clear breach of procedure, but the chairman said he would do no more than reflect the Russian view in the final report.

The big players, the US, EU and China accepted the agreement with varying degrees of reservation. But the representative for the small island states at severe risk from climate change was vociferous.

"We see the package before us as deeply deficient in mitigation (carbon cuts) and finance. It's likely to lock us on the trajectory to a 3,4,5C rise in global temperatures, even though we agreed to keep the global average temperature rise of 1.5C to ensure survival of all islands," he said.

"There is no new finance (for adapting to climate change and getting clean energy) - only promises that something might materialise in the future. Those who are obstructive need to talk not about how their people will live, but whether our people will live."

The island states accepted the agreement because for them it is better than nothing. Other diplomats will point to the immense complexity of the UN process, which is attempting to move away from the old Kyoto Protocol into a new phase binding rich and poor nations together in the task of tackling climate change.

The proposed new Loss and Damage mechanism is held up as an example of the success of the diplomatic process.

This agreement really opens a can of worms Nick Mabey, E3G think-tank, UK

Until now rich nations have agreed finance to help developing countries to get clean energy and adapt to climate change, but they have stopped short of accepting responsibility for damage caused by climate change elsewhere.

But in Doha that broad principle was agreed.

"It is a breakthrough," said Martin Khor of the South Centre - an association of 52 developing nations. "The term Loss and Damage is in the text - this is a huge step in principle. Next comes the fight for cash.

"What helped swing it was [US President Barack] Obama asking Congress for $60bn for the damage caused by [Hurricane] Sandy," he said.

Saleem ul-Huq, from the think-tank IIED in Bangladesh, told me the text should have been firmer, but he said: "This is a watershed in the talks. There is no turning back from this."

Nick Mabey, from the UK think-tank E3G, said: "This agreement really opens a can of worms - it might be applied to countries damming transboundary rivers, for instance. It could be very significant in future."

Greenhouse gases The Earth's atmosphere contains 'greenhouse gases', such as water vapour, carbon dioxide and methane

When sunlight strikes the Earth's surface some of it is reflected back as infrared radiation

Greenhouse gases absorb some of this radiation and trap the heat in the atmosphere - this is known as the greenhouse effect

Without the greenhouse effect Earth would be an extremely cold, inhospitable place Source: BBC Science Watch how the greenhouse effect works

No US veto

The US had been adamant that this measure would be blocked, and the EU nearly vetoed it, too.

Todd Stern, the US head of delegation here, was seen for much of the past few days walking in circles near the tea bar on his mobile phone to Washington. He told me: "We don't like this text, but we can live with it."

Media playback is unsupported on your device Media caption Andy Atkins, from Friends of the Earth, says the current agreement is an 'empty deal'

The key to US agreement was the positioning of the Loss and Damage mechanism under an existing process promising to mobilise $100bn a year for poor nations to adapt to climate change.

Facing tough budget decisions at home over the "fiscal cliff" it was essential for the US to avoid the impression that it was giving away more cash at this time.

The UK Climate Secretary, Ed Davey, told me: "We haven't agreed to set up a new institution - and there's no blank cheque. But there is clearly an issue if, say, an island state is lost underwater."

Ronny Jumea, from the Seychelles, told rich nations earlier that discussion of compensation would not have been needed if they had cut emissions earlier.

"We're past the mitigation [emissions cuts] and adaptation eras. We're now right into the era of loss and damage. What's next after that? Destruction?" he said.

The US has been blamed on finance and on failure to cut its emissions more aggressively.

The EU has also been under fire for failing to raise its promised cuts from 20%, which it is reaching easily, to 30%. (Scientists say it should be 40%.)

The EU has been held back by Poland, which insists on its right to burn its huge reserves of coal.

'Crushing Russian revolt'

Warsaw was refusing to sign the extension to the Kyoto climate protocol until it had a reassurance from the EU that it would receive flexible treatment on emissions cuts.

Russia, Belarus and Ukraine then further delayed the endgame of the conference with an argument over so-called "hot air" - the pollution permits they were given to allow their heavy industries to thrive.

Those industries collapsed but Poland and Russia insist that - as they suffered economic pain during the collapse - they should be allowed to use up the pollution permits as their economies grow again.

In effect, they want to be able to increase their emissions as other nations are obliged to cut theirs.

The nature of the Russian objection was unclear, but an EU negotiator told me he believed the Russians were making a point of principle and did not expect further action.

The major task of this two-week conference has been untangling of the diplomatic spaghetti from climate agreements that have grown piecemeal over the past 15 years.

It is widely agreed that a useful house-keeping job was done to help the UN move towards the next phase, which aims at a globally-encompassing agreement.

Preliminary discussions were held on this, and it was quickly evident that making a global agreement fair to all parties will be monumentally difficult.

The talks were chaired by Abdullah bin Hamad al-Attiyah, a former head of the oil cartel Opec.

He was widely criticised for his laid-back style earlier in the week but at the last there was the unlikely spectacle of environmentalists cheering the ruthlessness of the chair in crushing the Russian revolt.

Climate change diplomacy makes strange bedfellows.

Follow Roger on Twitter @RHarrabin