It comes after two weeks of negotiation at the Paris summit
The final draft of a climate change agreement has been approved at the United Nations talks in Paris.
A total of 195 countries have backed the deal which aims to limit the rise in global warming this century to "well below" 2C by reducing carbon emissions.
The decision was greeted with huge cheers, tears and hugging and a standing ovation in the hall in the French capital.
The countries most vulnerable to climate change had lobbied for a 1.5C limit, while big polluters such as China, India and Saudi Arabia preferred 2C.
The draft agreement also includes a five-year review system to increase ambition and differentiation between nations as to what their responsibilities are.
With 2015 forecast to be the hottest year on record, world leaders and scientists have warned a deal on limiting greenhouse gases is vital for capping temperatures and avoiding the consequences of a changing climate.
Former President of Ireland and UN special envoy on climate change Mary Robinson says today's deal is an agreement for humanity.
In a statement, she welcomed the deal as one that provides the opportunity to transform our way of life to one that is fairer and more sustainable.
She says while the deal isn't perfect the Paris Agreement recognises the need to respect and promote human rights.
US President Barack Obama on Twitter called the agreement "huge".
Earlier, UN Secretary General Ban Ki-moon had made an impassioned plea to the diplomats charged with negotiating the deal.
"The whole world is watching. Billions of people are relying on your wisdom," he said.
But protesters from environmental and human rights groups gathered near the Eiffel Tower to denounce the accord as insufficient.
Thomas Coutrot of advocacy group Attac said it is an optical illusion that "masks" a lack of serious changes like abandoning oil altogether.
The full document can be read here.