Almost 200 nations have voted to extend the Kyoto Protocol until 2020.
This will avert a new setback to two decades of United Nations efforts that have failed to halt rising world greenhouse gas emissions.
The extension of the Kyoto Protocol keeps it alive as the only legally binding plan for combating global warming.
It will cover developed nations whose share of world greenhouse gas emissions is less than 15%.
For the past two weeks, delegates have been trying to thrash out an agreement on a deal limiting global warming.
The United States has been at odds with many representatives over whether rich nations should be made to compensate poorer nations for losses due to climate change.
Delegates spent hours studying the deal put forward by the host, and OPEC member, Qatar.
The deal will also postpone until 2013 a row over demands from developing nations for more cash to help them cope with global warming.
Developing nations were initially divided over the modest deal that all sides said fell short of recommendations by scientists for tougher action to try to avert more heatwaves, sandstorms, floods, droughts and rising sea levels.
The deal will extend the Kyoto Protocol for eight years.
It had obliged about 35 industrialised nations to cut greenhouse gas emissions by an average of at least 5.2% below 1990 levels during the period from 2008 to 2012.
The two-week UN meeting in the Qatari capital had been due to end yesterday, but the talks stretched into this afternoon.