Nearly 200 countries at the UN climate talks have agreed universal, transparent rules on how nations can cut greenhouse gas emissions and curb global warming, putting the principles of the 2015 Paris climate accord into action.
But to the frustration of environmentalists and a group of countries urging more ambitious climate goals, negotiators delayed decisions on two other climate issues until next year in an effort to get a deal.
"Through this package, you have made a thousand little steps forward together," said Michal Kurtyka, a senior Polish official chairing the talks.
"We will all have to give in order to gain," he said. "We will all have to be courageous to look into the future and make yet another step for the sake of humanity."
The talks in Poland took place against a backdrop of growing concern among scientists that global warming on Earth is happening faster than governments are responding.
Last month, a study found global warming will worsen disasters such as the deadly California wildfires and the powerful hurricanes that have hit the United States this year.
A recent report by the Intergovernmental Panel on Climate Change (IPCC) concluded that while it's possible to cap global warming at 1.5C by the end of the century compared to pre-industrial times, this would require a dramatic overhaul of the global economy, including a shift away from fossil fuels.
Alarmed by efforts to include this in the final text of the meeting, the oil-exporting nations of the US, Russia, Saudi Arabia and Kuwait blocked an endorsement of the IPCC report mid-way through this month's talks in the Polish city of Katowice.
That prompted uproar from vulnerable countries like small island nations and environmental groups.
The final text at the UN talks omits a previous reference to specific reductions in greenhouse gas emissions by 2030, and merely welcomes the "timely completion" of the IPCC report, not its conclusions.
Last-minute snags forced negotiators in Katowice to go into extra time, after Friday's scheduled end of the conference had passed without a deal.
One major sticking point was how to create a functioning market in carbon credits. Economists believe that an international trading system could be an effective way to drive down greenhouse gas emissions and raise large amounts of money for measures to curb global warming.
But Brazil wanted to keep the piles of carbon credits it had amassed under an old system that developed countries say wasn't credible or transparent.
Among those that pushed back hardest was the US, despite President Donald Trump's decision to pull out of the Paris climate accord and his promotion of coal.
"Overall, the US role here has been somewhat schizophrenic - pushing coal and dissing science on the one hand, but also working hard in the room for strong transparency rules," said Elliot Diringer of the Centre for Climate and Energy Solutions, a Washington think tank.