(Bloomberg) -- The COP27 climate talks in Egypt, which had appeared close to collapse on Saturday morning, were poised for a last-minute deal after progress on a landmark agreement to pay poorer countries for harm caused by global warming. 

The proposal would establish a new fund next year for the cost of climate disasters. In return Europe, pushed for tougher language on reducing emissions. After hours of wrangling with countries including China, Brazil and Saudi Arabia, changes were agreed to that part of the deal, putting a final text within reach.

Work was still going on late into Saturday night, however. As officials in a closed-door meeting debated the final draft to take to the closing public session for sign off, the US made a late intervention that the deal should include a call to phase out all unabated fossil fuels, according to people familiar with the matter. If it survives, it would go significantly beyond the language agreed last in Glasgow, which called only for the phase down of coal. 

The day had started with a threat from EU climate chief Frans Timmermans to walk out of the negotiations in the Red Sea resort of Sharm El-Sheikh, risking the prospect of the first annual COP meeting without a deal for more than a decade. He has been a prime mover at the summit, trying to unlock progress through a grand bargain exchanging the promise of loss and damage cash for a harder line on emissions.

“The EU is united in our ambition to move forward and build on what we agreed in Glasgow,” Timmermans said, flanked by a group of European energy ministers. “Our message to partners is clear: We cannot accept that 1.5C dies here and today.”

The breakthrough on loss and damage came with the addition of a line that ensures funds will go only to the most vulnerable countries, like small island states and least developed nations. The text also includes a reference that could include other countries -- like China --  contributing to solve the problem.

The European demand for global emissions to peak by 2025 and a pledge to phase down all fossil fuels weren’t in the latest version of text, but work was ongoing to find language that could assuage European concerns.

The UK, a key ally of the EU on climate, said the latest text threatened to take climate action backward from Glasgow, an indication that movement would have to be made on mitigation before Europe could sign the deal. 

“The text right now does not go beyond Glasgow and it doesn’t even take us to Glasgow,” said Alok Sharma, the UK’s lead negotiator, who was president of last year’s COP in the Scottish city.

Still, the deal on loss damage pleased African delegations, which had set securing promises on compensation before the summit started. 

“It is a victory, not only for Africa, but for developing nations,” said Ephraim Mwepya Shitima, the chairman of the African Group of Negotiators. “We will be going back smiling.”

South Africa’s environment minister, Barbara Creecy, said the payments could become significant in time.

“Loss and damage can potentially take an enormous amount of funding,” Creecy said in an interview. “The purpose of allowing another year so that further sources of funding and financing can be identified.”

Saturday also brought the resumption of climate cooperation between China and the US, a further sign that the meeting between presidents Xi Jinping and Joe Biden at the Group of 20 summit in Bali thawed relations between the world’s two largest emitters. China’s chief negotiator Xie Zhenhua made the announcement in a press briefing. His US counterpart John Kerry is isolating because of a Covid infection. 

“Today, we have agreed that after this COP we will continue our formal consultation,” Xie said.

Talks on climate were suspended after Speaker Nancy Pelosi’s visit to Taiwan earlier this year.

--With assistance from Salma El Wardany, Mirette Magdy, Antony Sguazzin and Laura Millan Lombraña.

(Adds details on negotiations in second paragraph.)

©2022 Bloomberg L.P.