Brutal power politics made sure the climate conference was crushed and the red dragon's future as an economic superpower was secure. Mark Lynas reports from the inside.

Copenhagen was a disaster. That much is agreed. But the truth about what happened is in danger of being lost amid the spin and inevitable mutual recriminations. The truth is that China wrecked the talks, intentionally humiliated Barack Obama, and insisted on an awful ''deal'' so Western leaders would walk away carrying the blame. How do I know this? I was in the room and saw it happen.

China's strategy was simple: block the open negotiations for two weeks and then ensure that the closed-door deal made it look as if the West had failed the world's poor once again. And sure enough, the aid agencies, civil society movement and environmental groups all took the bait.

The failure was ''the inevitable result of rich countries refusing adequately and fairly to shoulder their overwhelming responsibility'', said Christian Aid. ''Rich countries have bullied developing nations,'' fumed Friends of the Earth International.

All very predictable, but the opposite of the truth. I saw Obama fighting to salvage a deal, and the Chinese delegate saying no, over and over again. One columnist approvingly quoted the Sudanese delegate, Lumumba Stanislaus-Kaw Di-Aping, who denounced the Copenhagen Accord as ''a suicide pact, an incineration pact, in order to maintain the economic dominance of a few countries''.

But Sudan behaved at the talks as a puppet of China. It was a perfect stitch-up. China gutted the deal behind the scenes and then left its proxies to savage it in public.

Here is what actually went on late last Friday night as heads of state from two dozen countries met behind closed doors. Obama was at the table for several hours, sitting between the British Prime Minister, Gordon Brown, and the Ethiopian Prime Minister, Meles Zenawi. The Danish Prime Minister was chairman of the meeting, and on his right sat Ban Ki-moon, Secretary-General of the United Nations. Probably only about 50 or 60 people, including the heads of state, were in the room. I was attached to a delegation whose head of state was present for most of the time.

I was profoundly shocked. The Chinese Premier, Wen Jiabao, did not deign to attend the meetings personally, instead sending a second-tier official in the country's foreign ministry to sit opposite Obama. The diplomatic snub was obvious and brutal, as was the practical implication: several times during the session, the world's most powerful heads of state were forced to wait around as the Chinese delegate went off to make telephone calls to his ''superiors''.

To those who would blame Obama and rich countries in general, know this: it was China's representative who insisted that industrialised country targets - previously agreed as an 80 per cent cut by 2050 - be taken out of the deal. ''Why can't we even mention our own targets?'' demanded a furious Angela Merkel. Kevin Rudd was annoyed enough to bang his microphone. Brazil's representative, too, pointed out the illogicality of China's position. Why should rich countries not announce even this unilateral cut? The Chinese delegate said no, and I watched, aghast, as Merkel threw up her hands in despair and conceded the point. Now we know why - because China bet, correctly, that Obama would get the blame for the Copenhagen accord's lack of ambition.

China, backed at times by India, then proceeded to take out all the numbers that mattered. A 2020 peaking year in global emissions, essential to restrain temperatures to 2 degrees, was replaced by woolly language suggesting emissions peak ''as soon as possible''. The long-term target - of global 50 per cent cuts by 2050 - was also excised. No one else, except, perhaps, India and Saudi Arabia, wanted this. Had the Chinese been absent, we would have left Copenhagen with a deal that had environmentalists popping champagne corks.

So how did China pull off this coup? First, it was in an extremely strong negotiating position. China didn't need a deal. As the foreign minister of a developing country said to me: ''The Athenians had nothing to offer to the Spartans.'' On the other hand, Western leaders in particular - but also presidents Lula da Silva of Brazil, Jacob Zuma of South Africa, Felipe Calderon of Mexico and many others - were desperate for a positive outcome. Obama needed a strong deal perhaps more than anyone. The US had confirmed a $US100 billion ($114 billion) offer to developing countries to help them adapt, put serious cuts on the table for the first time (17 per cent below 2005 levels by 2020) and was obviously prepared to up its offer.

Above all, Obama needed to be able to show to the US Senate that he could deliver China in any global climate regulation framework, so conservative senators could not argue that US carbon cuts would further advantage Chinese industry. With midterm elections looming, Obama and his staff knew Copenhagen probably would be their only chance to go to climate change talks with a strong mandate.

This further strengthened China's negotiating hand, as did the complete lack of civil society political pressure on China or India. It's an iron rule that campaign groups never blame developing countries for failure.

The Indians, in particular, are past masters at co-opting the language of equity (''equal rights to the atmosphere'') in the service of planetary suicide - and leftish commentators are hoist with their own petard.

With the deal gutted, the heads of state session concluded with a final battle as the Chinese delegate insisted on removing the 1.5 degrees target so beloved of the small island states and low-lying nations who have most to lose from rising seas. President Mohamed Nasheed of the Maldives, supported by Brown, fought valiantly to save this crucial number. ''How can you ask my country to go extinct?'' demanded Nasheed. The Chinese delegate feigned great offence - and the number stayed, but surrounded by language that makes it all but meaningless. The deed was done.

So what is China's game? Why did China, in the words of a British analyst who spent hours in heads-of-state meetings, ''not only reject targets for itself, but also refuse to allow any other country to take on binding targets''? The analyst's answer: China wants to weaken climate regulation now ''in order to avoid the risk that it might be called on to be more ambitious in a few years' time''.

This does not mean China is not serious about global warming. It is strong in the wind and solar industries. But the country's growth, and growing global political and economic dominance, is based largely on cheap coal. China knows it is becoming an uncontested superpower; indeed, its newfound muscular confidence was on striking display in Copenhagen. Its coal-based economy doubles every decade, and its power increases commensurately. Its leadership will not alter this magic formula unless it absolutely must.

Copenhagen was much worse than just another bad deal; it illustrated a profound shift in geopolitics. This is fast becoming China's century, yet its leadership has displayed that multilateral environmental governance is not only not a priority, but is viewed as a hindrance to the new superpower's freedom of action. I'm more despondent than I have felt in a long time. After all the hope and all the hype, the mobilisation of thousands, a wave of optimism crashed against the rock of global power politics, fell back and drained away.

Guardian News & Media