Reuters reports that after two weeks of talks in the Polish city of Katowice, nations finally reached consensus on a more detailed framework for the 2015 Paris Agreement which aims to limit a rise in average world temperatures to "well below" two degrees celsius above pre-industrial levels.
Before the talks started, many expected that the deal would not be as robust as is needed.
Still, exhausted ministers managed to bridge a series of divides to produce a 156-page rulebook - which is broken down into themes such as how countries will report and monitor their national pledges to curb greenhouse gas emissions and update their emissions plans.
However, an eight-page decision framework text was criticised by some countries and green groups for failing to urge increased ambitions on emissions cuts sufficiently to curb rising temperatures.