Almost 200 nations, including the world's top greenhouse gas producers, China and the United States, have adopted a set of rules meant to breathe life into the 2015 Paris climate accord by setting out how countries should report their emissions and efforts to reduce them.
But negotiators delayed other key decisions until next year - a move that frustrated environmentalists and countries that wanted more ambitious goals in light of scientists' warnings that the world must shift sharply away from fossil fuels in the coming decade.
"The majority of the rulebook for the Paris agreement has been created, which is something to be thankful for," said Mohamed Adow, a climate policy expert at Christian Aid. "But the fact countries had to be dragged kicking and screaming to the finish line shows that some nations have not woken up" to the dire consequences of global warming as outlined in a report by the U.N Panel on Climate Change, or IPCC.
Officials at the talks, which ended late Saturday in the Polish city of Katowice, agreed upon universal rules on how nations can cut emissions. Poor countries secured assurances on financial support to help them reduce emissions, adapt to changes such as rising sea levels and pay for damage that has already happened.
"Through this package, you have made a thousand little steps forward together," said Michal Kurtyka, a senior Polish official who led the talks. While each country would likely find some parts of the agreement it did not like, he said, efforts were made to balance the interests of all parties.
"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 took place against a backdrop of growing concern among scientists that global warming is proceeding faster than governments are responding to it. Last month, a study found that global warming will worsen disasters such as the deadly California wildfires and the powerful hurricanes that have hit the United States this year.
The recent report by the IPCC concluded that while it's possible to cap global warming at 1.5 degrees Celsius (2.7 degrees Fahrenheit) by the end of the century compared to pre-industrial times, doing so would require a dramatic overhaul of the global economy, including a shift away from fossil fuels.
Alarmed by efforts to include that idea in the final text of the meeting, the oil-exporting nations of the U.S., Russia, Saudi Arabia and Kuwait blocked an endorsement of the IPCC report midway through this month's talks.
That prompted uproar from vulnerable countries like small island nations and environmental groups.
The final text omitted a previous reference to specific reductions in greenhouse gas emissions by 2030 and merely welcomed the "timely completion" of the IPCC report, not its conclusions. Johan Rockstrom, a scientist who helps to lead the Potsdam Institute for Climate Impact Research, called the agreement "a relief." The Paris deal, he said, "is alive and kicking, despite a rise in populism and nationalism."
His biggest concern, he said, is that the summit "failed to align ambitions with science, in particular missing the necessity of making clear that global emissions from fossil fuels must be cut by half by 2030" to stay in line with the IPCC report.
Alden Meyer, director of strategy and policy at the Union of Concerned Scientists, said the talks created "a solid foundation for implementation and strengthening" of the Paris agreement and could help bring the U.S. back into the deal by a future presidential administration.
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 United States, despite President Donald Trump's decision to pull out of the Paris climate accord and his promotion of coal as a source of energy.
"Overall, the U.S. 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 Center for Climate and Energy Solutions, a Washington think tank.
The U.S. is still technically in the Paris agreement until 2020, which is why American officials participated in the Katowice talks.
When it came to closing potential loopholes that could allow countries to dodge their commitments to cut emissions, "the U.S. pushed harder than nearly anyone else for transparency rules that put all countries under the same system, and it's largely succeeded," Diringer said.
In the end, a decision on the mechanics of an emissions-trading system was postponed to next year's meeting. Countries also agreed to consider the issue of raising ambitions at a U.N. summit in New York next September.
Canada's Environment Minister Catherine McKenna suggested there was no alternative to such meetings if countries want to tackle global problems, especially as multilateral diplomacy is under pressure from nationalism.
"The world has changed. The political landscape has changed," she told The Associated Press. "Still you're seeing here that we're able to make progress. We're able to discuss the issues. We're able to come to solutions."