The agreement still means a success for the work to counteract climate change, says SVT's climate correspondent Erika Bjerström.

- It is still the first time we have in a climate agreement that renewable energy sources will replace fossil fuels, she says.

The final minutes were unexpectedly dramatic and emotionally charged.

At 20.30, the delegates gathered to make a decision.

India then proposed changes to the final agreement text, in particular that the term "phase out" coal power should be replaced by "phase down".

Chairman taken

The delegates from Switzerland and the EU expressed great disappointment, but still agreed to the changes.

The chairman of the climate meeting, Alok Sharma, was noticeably taken before he clubbed the agreement shortly after 20.40 Swedish time.

-I understand the great disappointment that you feel.

But I also want to say that it is crucial that we protect this package, he said.

Revised goals next year

The agreement reiterates the Paris Agreement's goal of limiting global warming to 1.5 degrees.

This will be done with the help of sharp emission reductions, including a reduction of net emissions to zero by 2050.

The countries will return to the climate summit next year with revised national targets for reducing emissions.

The rich countries undertake to at least double their aid for climate measures by 2025 compared to 2019.

The agreement also states that there is a need for a "fair transition", which the poorer countries have argued for.