The world community of 186 states, with the notable exception of the United States - the most powerful and polluting country - adopted the Kyoto protocol yesterday, an historic first step towards saving the planet from the worst effects of global warming.
After years of wrangling and two days and nights of non-stop negotiations the tension and tiredness switched to celebration and elation at the agreement to create the most comprehensive legally binding environmental treaty the world has seen.
It was a triumph for EU diplomacy, and a slap in the face for President George Bush, who repudiated the treaty as "fatally flawed" in March, expecting the rest of the world to follow.
The deal makes the US an environmental pariah and puts enormous pressure on the White House to come up with its own promised proposals to tackle climate change.
Japan, Canada and Australia, which prior to Bonn seemed reluctant to displease Mr Bush, were won over by the concessions made by the EU, which made their greenhouse gas reduction targets easier to reach.
In the circumstances it would have been particularly hard for the Japanese to explain why they had dropped the treaty and dishonored the city of Kyoto, where the original targets were negotiated.
Although the concessions mean the cuts in greenhouse gases by 37 of the world's richest and most developed countries will be a marginal 1%-3%, compared with the 60%-80% scientists are demanding to make the climate safe, it is a vital start. The framework of the agreement allows new targets for periods beyond 2010, leaving scope for further deep cuts in the future.
The treaty will give a huge boost to renewable energy and clean technologies, and start a new world trade in carbon, probably based in London.
The developing world gains, with $500m (£350m) a year in extra aid aimed towards helping it to adapt to climate change, and the transfer of clean technology.
Reaction in Bonn among ministers and environmental groups was universal enthusiasm, tempered with slight disappointment at the reduced targets.
Michael Meacher, Britain's environment minister, said: "Climate change is the single greatest threat to the human race. This agreement is a historic day that all of us will remember."
Margot Wollstrom, the EU environment commissioner, said: "Now we can go home and look our children in the eye and be proud of what we have done."
The only sour note to the proceedings was the hostile reception of Paula Dobriansky, the US under secretary for global affairs, who was booed by fellow ministers and delegates when she said: "The Bush administration takes the issue of climate change seriously and we will not abdicate our responsibilities."
Perhaps wisely, she omitted a sentence in her published text which said: "This does not change our view that the Kyoto protocol is not sound policy."
Despite this, most ministers were anxious not to close the door on the US, readily conceding, as Ms Wollstrom put it, that the major flaw in the treaty was that America was not a party to it.
The Japanese prime minister, Junichiro Koizumi, welcoming the agreement in Bonn, was also quick to go on the record to say that he would "continue maximum efforts towards an agreement inclusive of the US".
Apart from these concerns the atmosphere in Bonn was jubilant. Jan Pronk, the Dutch chairman, who had partly been blamed for the spectacular collapse of talks in the Hague last year and had suffered dark mutterings about his abilities, emerged early yesterday as the hero of the hour.
Clearly emotional at the standing ovation, his legendary self-control perhaps eroded by 48 hours without sleep, he said: "We failed in the Hague but we felt we could not fail twice. Citizens, electorates, the public, expected a result. Globalization is getting so much a bad name, but we have shown that global decisions can be good for the environment."
Peter Hodgson, representing New Zealand, summed up the mood when he said: "We have delivered probably the most comprehensive and difficult agreement in human history."
© Guardian Newspapers Limited 2001