Media playback is unsupported on your device Media caption The BBC's Daniel Boettcher explains what is included in the climate change deal

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 intense 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 of parties (COP) 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."

COP21: In summary

As he struck the gavel to signal the adoption of the deal, delegates rose to their feet cheering and applauding.

Media playback is unsupported on your device Media caption The announcement was greeted by cheers and excitement in the hall

US President Barack Obama has hailed the agreement as "ambitious" and "historic", but also warned against complacency.

"Together, we've shown what's possible when the world stands as one," he said.

And although admitting that the deal was not "perfect", he said it was "the best chance to save the one planet we have".

China's chief negotiator Xie Zhenhua said the deal was not perfect. But he added that "this does not prevent us from marching historical steps forward".

Nearly 200 countries took part in the negotiations to strike the first climate deal to commit all countries to cut emissions, which would come into being in 2020.

The chairman of the group representing some of the world's poorest countries called the deal historic, adding: "We are living in unprecedented times, which call for unprecedented measures.

"It is the best outcome we could have hoped for, not just for the Least Developed Countries, but for all citizens of the world."

Key points

The measures in the agreement 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.

Image copyright Reuters Image caption UN Secretary-General Ban Ki-moon and French President Hollande join in the celebrations

Analysis: The BBC's Matt McGrath in Paris

The speeches and the cliches at the adoption of the Paris Agreement flowed like good champagne - success after all has many fathers! The main emotion is relief. The influence of the COP president, Laurent Fabius, cannot be overstated. His long diplomatic career gave him a credibility seldom matched in this arena. He used his power well.

The deal that has been agreed, under Mr Fabius, is without parallel in terms of climate change or of the environment. It sets out a clear long term temperature limit for the planet and a clear way of getting there. There is money for poor countries to adapt, there is a strong review mechanism to increase ambition over time. This is key if the deal is to achieve the aim of keeping warming well below 2C.

More than anything though the deal signifies a new way for the world to achieve progress - without it costing the Earth. A long term perspective on the way we do sustainability is at the heart of this deal. If it delivers that, it truly will be world changing.

Read more from Matt McGrath

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.

'Almost nothing binding'

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 suggested that the emission reductions currently outlined in the INDCs submitted by countries would only limit global temperature rise by 2.7C.

Nick Mabey, chief executive of climate diplomacy organisation E3G, said the agreement was an ambitious one that would require serious political commitment to deliver.

"Paris means governments will go further and faster to tackle climate change than ever before," he said.

"The transition to a low carbon economy is now unstoppable, ensuring the end of the fossil fuel age."

UN climate conference 30 Nov - 11 Dec 2015

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

More: BBC News special report (or follow the COP21 tag in the BBC News app)