A deal to attempt to limit the rise in global temperatures to less than 2C has been agreed at the climate change summit in Paris after two weeks of negotiations.
The pact is the first to commit all countries to cut carbon emissions.
The agreement is partly legally binding and partly voluntary.
Earlier, key blocs, including the G77 group of developing countries, and nations such as China and India said they supported the proposals.
President of the UN climate conference and French Foreign Minister Laurent Fabius said: “I now invite the COP to adopt the decision entitled Paris Agreement outlined in the document.
“Looking out to the room I see that the reaction is positive, I see no objections. The Paris agreement is adopted.”
As he struck the gavel to signal the adoption of the deal, delegates rose to their feet cheering and applauding.
Nearly 200 countries have been attempting to strike the first climate deal to commit all countries to cut emissions, which would come into being in 2020.
US President Obama was among the first world leaders to tweet his congratulations, describing the deal as “huge”.
The measures in the final draft included:
• To peak greenhouse gas emissions as soon as possible and achieve a balance between sources and sinks of greenhouse gases in the second half of this century
• To keep global temperature increase “well below” 2C (3.6F) and to pursue efforts to limit it to 1.5C
• To review progress every five years
• $100 billion a year in climate finance for developing countries by 2020, with a commitment to further finance in the future.
Ahead of the deal being struck, delegates were in a buoyant mood as they gathered in the hall waiting for the plenary session to resume.
Mr Fabius was applauded as he entered the hall ahead of the announcement.
Earlier, French President Francois Hollande called the proposals unprecedented, while UN Secretary-General Ban Ki-moon called on negotiators to “finish the job”.
However, the celebratory mood has not been shared among all observers.
Nick Dearden, director of campaign group Global Justice Now, said: “It’s outrageous that the deal that’s on the table is being spun as a success when it undermines the rights of the world’s most vulnerable communities and has almost nothing binding to ensure a safe and liveable climate for future generations.”
Some aspects of the agreement will be legally binding, such as submitting an emissions reduction target and the regular review of that goal.
However, the targets set by nations will not be binding under the deal struck in Paris.
Observers say the attempt to impose emissions targets on countries was one of the main reasons why the Copenhagen talks in 2009 failed.
At the time, nations including China, India and South Africa were unwilling to sign up to a condition that they felt could hamper economic growth and development.
The latest negotiations managed to avoid such an impasse by developing a system of Intended Nationally Determined Contributions (INDCs).
In these, which form the basis of the Paris agreement goal of keeping global temperature rise “well below” 2C (3.6F) above pre-industrial levels, nations outline their plans on cutting their post-2020 emissions.
An assessment published during the two-week talks suggests that the emission reductions outlined in the INDCs submitted by countries will only limit global temperature rise by 2.7C.
COP 21 – the 21st session of the Conference of the Parties – will see more than 190 nations gather in Paris to discuss a possible new global agreement on climate change, aimed at reducing greenhouse gas emissions to avoid the threat of dangerous warming due to human activities.
Explained: What is climate change?
In video: Why does the Paris conference matter?
Analysis: Latest from BBC environment correspondent Matt McGrath
In graphics: Climate change in six charts