Poor countries have accused a handful of richer nations of holding up progress on tackling the climate crisis at UN talks in Madrid, as demonstrators and activists vented their frustration in the final hours of two weeks of negotiations.

The talks, which had been due to end on Friday, dragged on with negotiators still battling on Saturday to salvage a result, as governments wrangled over the details of a seemingly arcane issue: carbon markets, governed by a provision of the 2015 Paris agreement known as article 6.

Brazil, India and China were singled out as acting to block agreement on article 6, as ministers from the Alliance of Small Island States (AOSIS) warned that their countries would suffer most if there was no decision.

Simon Stiell, Grenada’s environment minister, speaking for AOSIS, urged all parties to reach a compromise. “Our countries will be rendered uninsurable if we breach 1.5C warming,” he said.

There was a widespread view among delegates that Brazil was refusing to compromise on article 6 as a means of holding up implementation of the Paris accord. Brazil’s rightwing president, Jair Bolsonaro, is hostile to the Paris agreement, and is accused of paving the way for devastating fires set by ranchers in the Amazon, but the government is still officially a party to the UN talks.

Article 6 focuses on the role of carbon markets and carbon trading in helping countries to fulfil their pledges under the Paris agreement. Carbon markets allow for countries to claim carbon credits for carbon sinks, such as standing forests, and for emissions-cutting efforts, such as wind farms or renewable energy projects.

These credits can be sold to rich countries, which can count them towards their own emissions targets. Carbon markets were introduced in the 1997 Kyoto protocol as a mechanism for directing financial investment towards poor countries which would otherwise struggle to implement clean technology, or face economic pressure to cut down their forests.

Brazil’s contention is that its forests should be counted as carbon sinks towards its national emissions targets, meaning it could make less effort to cut emissions in other areas, but that it should also be allowed to sell credits based on keeping the forests intact. Critics regard this as double counting and some countries are determined to prevent it.

Other countries are also trying to ensure that carbon credits awarded in the decades since the Kyoto protocol are carried over beyond 2020, which critics say would allow those countries to ease off on their Paris commitments.

Carbon markets are seen by some businesses, economists and campaigners as a way to generate financial flows to poor areas, and to cut carbon at the lowest possible cost.

“Carbon markets are one way to not only manage mitigation [emissions cuts], but help to find the lowest cost and therefore the best possible means for implementing international efforts,” said Fenella Aouane, an investment specialist at the Global Green Growth Institute.

For campaigners, the issue is more nuanced. Nat Keohane, the senior vice president at the Environmental Defense Fund, said: “We know we are not going to solve the climate crisis without international cooperation... [Carbon markets] can be a way of cooperating and raising ambition.”

But he said the markets would only work with strong rules and a ban on double counting.

Jennifer Morgan, the executive director of Greenpeace International, said setting a price on carbon was a good way of assisting governments to make cuts, but warned that allowing countries simply to offset their emissions through carbon credits, rather than making substantial new efforts, would not work. “The real question is over urgency – we need absolute cuts in global carbon,” she said. “We see this as a dangerous distraction. Why are we here in 2019 still talking about a failed policy from 1997?”

Another vexed issue at the talks is loss and damage – the acknowledgment by rich countries that poor countries face serious hardship as the result of climate breakdown, even though most of the emissions to date have come from the rich world. Rich countries were willing as part of the Paris agreement to make this acknowledgment, which would open the way for the poor to receive financial assistance, but they balk at admitting liability, which could require legal redress and compensation payments.

The talks were intended to forge agreement on these outstanding issues in order to clear the way for a discussion to take placenext year around strengthening countries’ commitments under the Paris agreement.

The commitments put forward in Paris in 2015, for countries to cut or at least curb the growth of their emissions by 2030, were always acknowledged to be inadequate to the scale of the climate crisis. If allowed to stand, they would lead to an estimated 3C of warming, far beyond the 1.5C threshold beyond which sea level rises, droughts, storms and floods would devastate swathes of the globe.

At next year’s talks, to be hosted by the UK in Glasgow in November, countries are supposed to agree much more ambitious national commitments for 2030, in line with the Paris goal of holding heating to no more than 2C above pre-industrial levels, with an aspiration to stay within a 1.5C limit.

On Friday, a group of developing countries and the EU called the High Ambition Coalition said it was essential the Madrid outcome should involve a clear call for countries to come forward with more ambitious plans.

Frans Timmermans, the vice-president of the European commission, which on Thursday finally agreed a target of net zero carbon by 2050, said: “We can only get there [to 2050] if we start now. We need concrete plans and concrete steps – we need to come to Glasgow with plans.”