For the first time, the nations of the world have decided to help pay for the damage an overheating world is inflicting on poor countries.
But they finished marathon COP27 climate talks on Sunday without further addressing the root cause of those disasters - the burning of fossil fuels.
The deal establishes a fund for what negotiators call loss and damage.
It's a big win for poorer nations which have long called for cash because they are often the victims of floods, droughts, heat waves, famines and storms that are exacerbated by climate change, despite them having contributed little to the pollution that heats up the globe.
It is also long been called an issue of equity for nations hit by weather extremes and small island states that face an existential threat from rising seas.
“Three long decades and we have finally delivered climate justice,” said Seve Paeniu, the finance minister of Tuvalu.
Pakistan's environment minister, Sherry Rehman, said the establishment of the fund “is not about dispensing charity.”
"It is clearly a down payment on the longer investment in our joint futures,” she said, speaking for a coalition of the world’s poorest nations.
Pakistan endured its worst monsoon floods ever in June, which were partly triggered by melting glaciers.
Antigua and Barbuda’s Molwyn Joseph, who chairs the organisation of small island states, described the agreement as a “win for our entire world.”
"We have shown those who have felt neglected that we hear you, we see you, and we are giving you the respect and care you deserve,” he said.
The deal followed a game of climate change chicken over fossil fuels.
Early on Sunday morning in Sharm El Sheikh, delegates approved the compensation fund but had not dealt with the contentious issues of an overall temperature goal, emissions cutting and the desire to target all fossil fuels for phase down.
Through the wee hours of the night, the European Union and other nations fought back what they considered backsliding in the Egyptian presidency’s overarching cover agreement and threatened to scuttle the rest of the process.
The package was revised again, removing most of the elements Europeans had objected to but added none of the heightened ambition they were hoping for.
“What we have in front of us is not enough of a step forward for people and planet,” a disappointed Frans Timmermans, executive vice president of the European Union, told his fellow negotiators. “It does not bring enough added efforts from major emitters to increase and accelerate their emissions cuts.
“We have all fallen short in actions to avoid and minimise loss and damage,” Timmermans said. “We should have done much more.”
Germany's Foreign Minister Annalena Baerbock likewise voiced frustration.
“It is more than frustrating to see overdue steps on mitigation and the phase-out of fossil energies being stonewalled by a number of large emitters and oil producers,” she said.
The agreement includes a veiled reference to the benefits of natural gas as a low emission energy, despite many nations calling for a phase down of natural gas, which does contribute to climate change.
While the new agreement doesn't ratchet up calls for reducing emissions, it does retain language to keep alive the global goal of limiting warming to 1.5 degrees Celsius.
The Egyptian presidency kept offering proposals that harkened back to 2015 Paris language which also mentioned a looser goal of two degrees. The world has already warmed 1.1 degrees since pre-industrial times.
Nor does the deal expand on last year’s call to phase down global use of “unabated coal” even though India and other countries pushed to include oil and natural gas in language from Glasgow. That too was the subject of last minute debate, especially upsetting Europeans.
Last year’s climate talks president chided the summit leadership for knocking down his efforts to do more to cut emissions with a forceful listing of what was not done.
“We joined with many parties to propose a number of measures that would have contributed to this emissions peaking before 2025, as the science tells us is necessary. Not in this text,” the United Kingdom’s Alok Sharma said, emphasising the last part.
“Clear follow through on the phase down of coal. Not in this text. A clear commitment to phase out all fossil fuels. Not in this text. And the energy text weakened in the final minutes.”
And in his remarks to negotiators, U.N. climate chief Simon Stiell, who hails from Grenada, called on the world “to move away from fossil fuels, including coal oil and gas.”
However, that fight was overshadowed by the historic compensation fund.
“Quite a few positives to celebrate amidst the gloom and doom” of not cutting emissions fast enough to limit warming to 1.5 degrees, said climate scientist Maarten van Aalst of the Red Cross Red Crescent Climate Center, which responds to climate disasters.
It’s a reflection of what can be done when the poorest nations remain unified," said Alex Scott, a climate diplomacy expert at the think tank E3G.
But like all climate financials, it is one thing to create a fund, it’s another to get money flowing in and out, she said. The developed world still has not kept its 2009 pledge to spend 95 billion euros a year in other climate aid - designed to help poor nations develop green energy and adapt to future warming.
And there are reports suggesting fossil fuel lobbyists leaned heavily on African states, both to get access to the summit in Sharm El Sheikh and to water down commitments to tackle the use of fossil fuels.
Martin Kaiser, the head of Greenpeace Germany, described the agreement on a loss and damage as a “small plaster on a huge, gaping wound.”
“It’s a scandal that the Egyptian COP presidency gave petrostates such as Saudi Arabia space to torpedo effective climate protection," he said.
Many climate campaigners are concerned that pushing for strong action to end fossil fuel use will be even harder at next year's meeting, which will be hosted in Dubai, located in the oil-rich United Arab Emirates.