United Nations members have reached an agreement on how countries should tackle climate change.
Delegates have approved a framework for setting national pledges to be submitted to a summit next year.
Differences over the draft text caused the two-week talks in Lima, Peru, to overrun by two days.
Environmental groups said the deal was an ineffectual compromise, but the EU said it was a step towards achieving a global climate change deal in countries next year.
The talks proved difficult because of divisions between rich and poor countries over how to spread the burden of pledges to cut carbon emissions.
The agreement was adopted hours after a previous draft was rejected by developing countries, who accused rich nations of shirking their responsibilities to fight global warming and pay for its impacts.
Peru’s environment minister, Manuel Pulgar-Vidal, who chaired the summit, told reporters: “As a text it’s not perfect, but it includes the positions of the parties.”
Miguel Arias Canete, EU Commissioner for Climate Action and Energy, said the EU had wanted a more ambitious outcome but he still believed that “we are on track to agree a global deal” at a summit in Paris, France, next year.
UK climate change minister Ed Davey said: “I am not going to say it will be a walk in the park in Paris.”
He described the deal as “a really important step” on the road to Paris.
“That’s when the real deal has to be done.”