There was one thing above all others that wealthy countries wanted out of the Lima negotiations and that was a method of accounting for emissions cuts.

The issue that mattered above all to developing countries was deciding who should carry the burden of emissions cuts, and getting the money flowing for climate aid.

For small island states, acknowledgement of “loss and damage” due to climate change was critical. All three contingents got what they wanted – sort of. The deal reached on Saturday afternoon was critical in keeping the talks on track. The US and the European Union had pushed hard for a text that would require countries to offer upfront information about the nature of their pledges to cut emissions – “clarity, transparency and understanding”.

Wealthy countries also wanted a review process to ensure the pledges when they all come in would be enough to keep the world on course for two degrees of warming. But China especially had balked at providing detailed accounting of its emissions reductions plans, arguing that an outside review would amount to an affront to its sovereignty. The deal that emerged early on Sunday found a solution by changing a single word – “shall” to “may” – easing China’s concerns about outside interference.

However, the US and EU still had the detailed language about pledges – and claimed it as a win. In the more than 20 years of climate change negotiations, developing countries have held on hard to the idea that it was the burden of wealthy countries to deal with climate change. In the parlance of UN climate negotiations, it’s called the firewall.

America in particular has been determined to break down the wall, arguing that it is time for all countries to fight climate change. “The firewall issue is the most difficult issue. It is what the history of climate change negotiations has bequeathed to us. Countries that have grown and become wealthy cleave to it because it means they don’t have to do what other countries have to do,” said Ed Davey, the UK’s energy and climate change secretary.

It’s not entirely clear the firewall has gone. The text includes the phrase “common but differentiated responsibilities”, the old official UN designation, but also a new phrase “in light of different national circumstances”, which reflects the current reality of China and other giants.

Michael Jacobs, who served as climate change adviser to the former British prime minister Gordon Brown, said: “There aren’t two kinds of countries any more and that’s good.” In some ways, however, it’s the small island states that can claim the biggest win – by securing the inclusion of the words “loss and damage”.

The phrase was introduced into UN discussions two years ago to draw attention to the fate of those island states drowned by rising seas. However, rich countries are uncomfortable with the designation because they fear it will open up a whole new category of financial obligation. In the draft circulated earlier on Saturday, there was no mention of the words at all. “It’s like a slap in the face,” said Saleemul Huq, a senior fellow at the International Institute for Environment and Development. In the final text, “loss and damage” was back in, but without any specific commitments from rich countries. Still, the leader of Tuvalu told the negotiations he could live with the deal.