Countries have closed this year's United Nations climate summit with a hard-fought deal to create a fund to help poorer countries being battered by climate disasters.
The last minute deal came late on Sunday evening, even as many lamented its lack of ambition in tackling emissions.
The deal was widely lauded as a triumph for responding to the devastating impact that global warming is already having on vulnerable countries.
However, many countries said they felt pressured to give up on tougher commitments for limiting global warming to 1.5C in order for the landmark deal on the loss and damage fund to go through.
Delegates, worn out after intense overnight negotiations, made no objections as Egypt's COP27 President Sameh Shoukry rattled through the final agenda items and gavelled the deal through.
The deal for a loss and damage fund marked a diplomatic coup for small islands and other vulnerable nations in winning over the 27-nation European Union and the United States, which had long resisted the idea for fear that such a fund could open them to legal liability for historic emissions.
Those concerns were assuaged with language in the agreement calling for the funds to come from a variety of existing sources, including financial institutions, rather than relying on just rich nations to pay for it.
The climate envoy from the Marshall Islands said she was "worn out" but happy with the fund's approval.
"So many people all this week told us we wouldn't get it," Kathy Jetnil-Kijiner said.
"So glad they were wrong."
But it's likely to be several years before the fund exists, with the agreement setting out only a roadmap for resolving lingering questions including who would oversee the fund, how the money would be dispersed, and to whom.
While praising the loss and damage deal, many countries decried COP27's failure to push mitigation further, and said some countries were trying to roll back commitments made in the Glasgow Climate Pact.
"We had to fight relentlessly to hold the line of Glasgow," a visibly frustrated Alok Sharma, architect of the Glasgow deal, told the summit.
He listed off a number of ambition-boosting measures that were stymied in the negotiations for the final COP27 deal in Egypt: "Emissions peaking before 2025 as the science tells us is necessary? Not in this text. 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."
On fossil fuels, the COP27 deal text largely repeats wording from Glasgow, calling up parties to accelerate "efforts towards the phase down of unabated coal power and phase-out of inefficient fossil fuel subsidies."
Efforts to include a commitment to phase out, or at least phase down, all fossil fuels were thwarted.
The climate minister of the Maldives, which faces future inundation from climate-driven sea level rise, lamented the lack of ambition on curbing emissions.
"I recognise the progress we made in COP27 with the loss and damage fund", Aminath Shauna told the plenary.
But "we have failed on mitigation ... We have to ensure that we increase ambition to peak emissions by 2025. We have to phase out fossil fuel".