After 30 hours of deadlock, they approved a pathway to a new global climate treaty in Paris in 2015. The agreement was achieved after a series of last minute compromises often involving single words in draft texts.
Negotiators also made progress on the contentious issue of loss and damage that developing countries are expected to suffer in a warming world. Green groups were angry about the lack of specific commitments on finance.
The Conference of the Parties (Cop) started two weeks ago in the shadow of Typhoon Haiyan. Speaking at the time, the lead delegate from the Philippines, Yeb Sano, drew tears in the auditorium with a heartfelt plea to "stop this climate madness".
But the good intentions foundered on the political and economic realities of a complex process where agreement has to be by consensus.
The mood was not helped by the Japanese government announcing it would not be able to meet its 2020 emissions cuts target.