"Cancún can!" chanted the climate change activists in the lobby at the Moon Palace resort, where the world's much maligned climate negotiators gathered to try to fix the mess created by last year's last-minute, last-ditch Copenhagen accord.

Many thought that the accord, with its loose, pledge and review provisions and insufficient emissions reduction targets, meant the end of the international climate change regime – and multilateralism – as we knew it. But the world's governments have now responded in Cancún, and we might be on the road to something much better.

At last, the world has agreed to try to keep global warming to below 2C above pre-industrial levels, with a commitment to look at whether 1.5C is a safer alternative on the basis of new, improved science in 2015. We agreed that Copenhagen's emissions targets are insufficient, and outlined a process to analyse and make them more ambitious. A new green climate fund has been established to channel finance – hopefully $100bn a year by 2020 – to finance emissions reductions and adaptation by the world's most vulnerable countries to the climate impacts we know will intensify. We have paved the way for the development of national policies to take advantage of new capital flows for forest protection and reduced carbon emissions from deforestation. And the overall agreement keeps the Kyoto protocol alive, but only just – next year's COP in Durban, South Africa, is the last chance to agree a new round of binding emissions reduction commitments from industrialised countries when the current targets expire at the end of 2012.

Finding a deal in today's climate negotiations is no easy feat given the extraordinary diversity of national interests and priorities, varying from the Gulf state oil producers to the tiny, low-lying atoll countries out in the middle of the Pacific.

Copenhagen was marked by acrimony and dissent, with tears and wild interventions portraying a weak and poorly drafted agreement, brokered by leaders of the world's biggest emitters. The deal was later rejected by a number of countries left out of the room. Cancún was different. There were tears at the end, but they captured a widespread relief that three years of talking had at last produced something worthwhile.

Looking back, the reasons for this comparative success are very clear. Mexico, which hosted the meeting, performed superbly. The foreign minister, Patricia Espinosa, and her impressive team of diplomats listened and listened and listened. They spent a whole year listening. And by this simple act, they helped rebuild the trust and spirit of compromise that had been shattered in Copenhagen. It made me think at many times over the last two weeks that Mexico was perhaps the only country in the world which could have brokered an international climate deal in 2010.

While transparency and inclusiveness were the catch-phrases of this gathering, every international negotiator knows that at some point during a complex and politically charged multilateral process, a small, humid room is necessary to crunch the final deal.

So it was in Cancún, when with just 36 hours to go, Mexico quietly invited a handful of key delegations – including my own, the Republic of the Marshall Islands – to bust through the last obstacles: how to "anchor" the emissions reductions pledges on the table; what to say about the future of the Kyoto protocol; how often to require China, India and Brazil to report on their national emissions; and whether to work towards a new treaty that could capture wider global co-operative action, alongside the provisions in the Kyoto protocol.

Some important questions still remain on the table. But Cancún was an extraordinary event in climate diplomacy. One moment will stick with me from that small room: Mexico's expert deal-broker and career multilateralist ambassador Luis Alfonso de Alba defused a particularly tense moment with the line "whether we agree or not, every concern is legitimate". It is exactly this sentiment which produced the breakthrough in Cancún. May every future climate negotiation be as gracious and fruitful as this one.

• Dean Bialek is a former Australian diplomat, who advised the delegation of Republic of the Marshall Islands at Cancún