Fourteen days of gritty negotiations by 20,000 diplomats from nearly 200 countries -- and the hopes of salvaging a deal at COP26 -- boiled down to cash, coal, compensation and the willingness to speed up the drawdown of fossil fuels.
Here's a breakdown of the main sticking points that got unpicked for a deal to get hammered through.
- Calling out 'Fossil fuels' -
The Paris Agreement that enjoined the world's nations to reduce planet-warming greenhouse emissions does not contain the words "coal", "oil", "natural gas" or "fossil fuels".
This may seem odd, given that global warming is overwhelmingly caused by burning hydrocarbons, but it helps explain why the first-ever mention of fossil fuels in a document flowing from the 2015 treaty has been described as "historic" and "precedent-setting".
An initial draft of what would become the final text called on "parties to accelerate the phasing-out of coal and subsidies for fossil fuel".
But under pressure from India, China, South Africa and Saudi Arabia, that clarion call got progressively watered down to: "accelerate efforts towards phase-out of unabated coal power and inefficient fossil fuel subsidies."
"Unabated" refers to emissions from coal-fired power plants that are not syphoned off to prevent them from entering the atmosphere.
And in a dramatic, last-minute change agreed across huddles in the final plenary, "phase-out" of unabated coal became a "phase-down".
- Loss and Damage -
The call for action in the 1992 UN climate convention rests on two pillars: mitigation to cut emissions, and adaptation to help poor and vulnerable countries prepare for climate change in the future.
But since that bedrock treaty was crafted, climate impacts have become a here-and-now reality, with yearly economic cost measured in the billions.
Facing that reality, the UN climate forum bolted on the concept of "loss and damage" to cover climate-driven catastrophes for which it is too late or impossible to prepare for.
"When you don't do enough mitigation you get more into the adaptation space, and when you don't do enough adaptation you have to deal with loss and damage," Aiyaz Sayed-Khaiyum, Fiji's minister for economy and climate Change, told AFP.
The loss and damage mechanism introduced in 2013, however, has remained largely an empty shell.
Developing countries drew a line in the sand in Glasgow, demanding concrete steps.
But their hope for the establishment of a funded "facility" was shot down, with the United States in particular concerned that such a step could put it and other rich countries on the hook for billions, if not trillions, in damages.
A compromise, laid out in the text, would be the establishment of a yearly "dialogue", running through to 2024, to "discuss the arrangement for the funding of activities".
- Ramping up climate ambition -
Under the 2015 Paris Agreement nations agreed to update their emissions-cutting plans every five years.
The first set of revisions came due at the end of 2020, but most were not submitted until this year because of the Covid pandemic.
But with emissions still on the rise, and warnings from scientists that the world has only this decade to drastically cut carbon pollution, calls have grown for additional updates before the next scheduled reporting round in 2025.
The new text "requests parties to revisit and strengthen the 2030 targets in their nationally determined contributions (NDCs) as necessary to align with the Paris Agreement temperature goal by the end of 2022."
In UN jargon, "requests" is close to "must do", and many countries -- China, India, Saudi Arabia among them -- were not keen on accelerating the timetable.
- Carbon credit loopholes -
One of the thorniest debates during recent UN climate talks has been Article 6 of the Paris agreement, which deals with cross-border trade of carbon reduction credits.
The issue has dogged climate negotiations for years, with fears that if set up poorly, it would mean countries could trade dubious emissions reductions that cover up their failure to reduce greenhouse gas emissions at the source.
Laurence Tubiana, who helped craft the 2015 Paris climate treaty as France's chief negotiator, said that the new text had "closed some of the egregious loopholes, such as double counting".
"But it is not enough to stop bad faith companies and countries gaming the system," she told AFP, adding that a watchdog would need to monitor the implementation of the markets.
Unfortunately, Tubiana said, a provision to use a levy on some of the transactions to help the poorest countries adapt to climate change "got axed".