Developed countries and fast-growing economies have reached a last-minute compromise to avert a breakdown of UN climate talks in Warsaw, working towards the inking of a new UN pact in 2015 to slow down global warming.

After two weeks of negotiations, almost 200 nations agreed on Saturday that all countries should work towards curbing emissions as soon as possible and ideally by the first quarter of 2015.

Just in the nick of time, the negotiators in Warsaw delivered enough to keep the process moving. Jennifer Morgan, World Resources Institute

The agreement ended a deadlock between rich and poor about sharing out the burden of limiting emissions blamed for causing more heatwaves, floods, droughts and rising sea levels.

Under the last climate pact, the Kyoto Protocol, only the most developed countries were required to limit their emissions.

"Just in the nick of time, the negotiators in Warsaw delivered enough to keep the process moving," said Jennifer Morgan of the World Resources Institute think-tank.

China had insisted that developing nations should announce deep cuts in emissions while allowing emerging economies room to burn more fossil fuels to help end poverty.

But the United States noted that all nations agreed in 2012 that the 2015 deal would be "applicable to all" and accused emerging nations of harping back to previous deals.

Even after breaking the deadlock over which countries should tackle emissions, talks continued on another issue that has divided rich and poor: the aid that developed countries pay to developing ones to help them curb emissions and cope with to the impacts of climate change.

'Warsaw Mechanism'

Developed nations, which promised in 2009 to raise aid to $100bn a year after 2020 from $10bn a year in 2010-12, have resisted calls to set targets for 2013-19.

A draft text merely urged developed nations, which have been more focused on spurring economic growth than on fixing climate change, to set "increasing levels" of aid.

The talks have also proposed a "Warsaw Mechanism" which would provide expertise, and possibly aid, to help developing nations cope with loss and damage from extreme events such as heatwaves, droughts and floods, and creeping threats such as rising sea levels and desertification.

Developing nations have insisted on a "mechanism" - to show it was separate from existing structures - even though rich countries say that it will not get new funds beyond the planned $100bn a year from 2020.