BONN, Germany — The trillion-dollar question of who should pay for global warming is coming to a head in talks on an international climate pact, as developing countries worry they won't get enough money to tackle the problem.

With just five weeks left before a U.N. climate summit in Paris, developing countries closed ranks at weeklong talks ending Friday in Bonn and called on wealthy nations to make firm financial commitments to help them fight and adapt to climate change.

The Paris summit "will be judged by what is contained in the core agreement on finance. For us, that will be the yardstick for success," said Nozipho Mxakato-Diseko of South Africa, who chairs a developing country bloc of 134 countries.

In testy exchanges with the Algerian and U.S. diplomats leading the climate talks, Mxakato-Diseko complained that a draft deal they produced was "lopsided" in favour of developed countries. She even drew an analogy to apartheid.

Western delegates said they were disappointed by the characterization of the talks as a rich-poor struggle over responsibilities to address climate change.

"We strongly oppose that division," Netherlands climate envoy Michel Rentenaar told The Associated Press. "If there is a division, it's perhaps between those who want an ambitious accord and those who don't."

The slow pace in Bonn contrasted with the momentum outside the U.N. talks. Leaders of the Group of Seven wealthy economies this year endorsed "deep cuts" in climate-warming greenhouse gases, top polluters China and the U.S. deepened their co-operation on climate issues and Pope Francis called fighting climate change a moral imperative.

Yet delegates said it wasn't surprising that negotiations on the Paris agreement would get stuck on money — always a stumbling block in the U.N. talks — and that it probably would be one of the last issues to get untangled.

The Paris deal is likely to have some provisions on financing projects to fight global warming for poor countries. The question is how specific they will be.

"Some people just want to plant a few seeds and some want the rosebush in full bloom," said Alden Meyer, an observer of the talks from the Union of Concerned Scientists.

Developed countries have agreed to boost the flow of climate finance to $100 billion annually by 2020, but are reluctant to make firm commitments beyond that, partly because of budget uncertainties. They also want to expand the pool of donors to include China and other emerging economies.

European Union negotiator Sarah Blau said that was already happening outside the negotiations, pointing to a recent U.S.-China announcement where Beijing pledged $3.1 billion in climate finance to poor countries. The U.N. talks, she said, are "somehow detached from what's happening really on the ground."

The money is used in two ways. First, to reduce greenhouse gas emissions by helping developing countries switch from high-polluting fossil fuels to wind, solar and other renewable sources of energy. Second, to help the most vulnerable countries including small island nations adapt to climate change by building barriers against rising seas or developing drought-resilient crops.

Climate finance is hard to measure because there are no common standards on what to count. A recent report by the Organization for Economic Cooperation and Development estimated climate finance flows reached $62 billion in 2014, which developed countries took as a sign they were well on track toward the $100 billion.

Mxakato-Diseko dismissed those figures as unreliable "because we don't know what methodology was used, the veracity thereof, the credibility thereof."

Coalescing around the finance issue, developing countries appeared more united in Bonn than at previous talks this year and collectively rejected a 20-page draft agreement they said didn't address their concerns.

Amendments were made to the text, adding many competing options on how to deal with finance and other crunch issues, but few compromises were made. By Friday, it swelled to 55 pages and negotiators started thinking about scheduling another round of talks before Paris.

"We've been running a marathon for years to reach to this point. Now we need an all-out sprint to get over the finish line in Paris," said Jennifer Morgan of the World Resources Institute, a Washington-based environmental think-tank .

A deal in the French capital would be the first asking all countries to take action to reduce emissions. The previous agreement, the 1997 Kyoto Protocol, only required emissions targets from developing countries.

This time more than 150 countries have announced emissions targets for after 2020, when the Paris deal would take effect.

However, all commitments are voluntary so far. European attempts to make them compulsory in the agreement face stiff resistance from the Obama administration, which needs to submit any internationally binding targets to a skeptical Senate for approval.

Keep reading