COP26 President Alok Sharma has fought back tears and apologised as almost 200 countries agreed to a watered-down climate change deal, bringing an end to the two-week UN summit in Glasgow.
Though the agreement still keeps hopes alive of capping global warming at 1.5 degrees Celsius, a last-minute objection by India saw a clause about coal amended.
India is hugely dependent on coal to meet its energy needs.
The agreement now asks countries to accelerate their efforts towards a coal power "phase down" instead of "phase out".
Mr Sharma appeared to be overcome with emotion as he heard vulnerable nations voice their anger over the eleventh-hour change.
"May I just say to all delegates I apologise for the way this process has unfolded and I am deeply sorry," he told the assembled countries.
"I also understand the deep disappointment but I think, as you have noted, it's also vital that we protect this package."
It was at this point he reached for his gavel and paused, bringing his hand to his mouth in what appeared to be an effort to compose himself.
During this brief silence, delegates in the room burst into applause.
Mr Sharma thanked the crowd for their support, adding: "We need to proceed."
He then proposed the revised agreement to be accepted by delegates.
COP26 compromise reached despite objections
The last-minute change was met with dismay by the rich economies of the European Union and Switzerland as well as the Marshall Islands, one of the small Pacific island states whose existence is under threat from rising sea levels.
But all said they would let it stand for the sake of an overall agreement.
"The approved texts are a compromise. They reflect the interests, the conditions, the contradictions and the state of political will in the world today," UN Secretary-General Antonio Guterres said.
"They take important steps, but unfortunately the collective political will was not enough to overcome some deep contradictions."
The overarching aim Mr Sharma set before the conference was one that climate campaigners and vulnerable countries had found far too modest – namely, to "keep alive" the 2015 Paris Agreement's target to cap global warming at 1.5C above pre-industrial levels.
The agreement in effect acknowledged commitments made so far to cut emissions of planet-heating greenhouse gases are nowhere near enough, and asked nations to set tougher climate pledges next year, rather than every five years, as they are currently required to do.
Scientists say that to go beyond a rise of 1.5C would unleash extreme sea level rise and catastrophes including crippling droughts, monstrous storms and wildfires far worse than those the world is already suffering.
But national pledges made so far to cut greenhouse emissions – mostly carbon dioxide from burning coal, oil and gas – would only cap the average global temperature rise at 2.4C.
Do you have a story tip? Email: firstname.lastname@example.org.