Just over three weeks ago five Canadians died and 20 other tourists were injured when their Cancún hotel exploded. Investigations are not complete, but it is likely that it followed a build-up of gases from the rotting mangrove forest buried below the hotel. If so, most of the booming holiday city where the climate talks are taking place is in danger, having been built on hastily cleared mangrove forest and sand dunes.

But the biggest explosion in Cancún has been the city itself. New figures from the Mexican government show that the fastest-growing major resort in the world now gets more than 7 million visitors a year and has possibly 1 million permanent inhabitants. Yet in 1974 when the World Bank kick-started, Cancún it was a collection of huts and a small fishing village. It now has 80,000 hotel beds and more than 500 major hotels and resorts, including the Moon Palace hotel and the Cancúnmesse, where UN talks to agree action on climate change are under way.

"It was either forest or small communities [you would have seen if you visited before its development]. Everything exploded in the mid-1980s", says Barbara Bramble, adviser to the National Wildlife Federation in Washington DC, who used to visit at that time.

"Mangroves covered all the coastal area. They have just been paved over. This is the star example of how not to build a mass tourism mecca. It is an ecological mistake that should never have happened."

Exponential growth is now taking place all along a 100km stretch of coast south of Cancún. The village of Porto Morelos had 409 hotel beds in 2003; now it has 10,000. Playa del Carmen has been growing in population by more than 10% a year since 1985 and now has over 250,000 people. The once sleepy village of Tulum faces a city the size of Geneva, including a new international airport and three golf courses, being built on its doorstep. A frenzy of road-building, illegal mangrove destruction, land speculation and house-building is now taking place.

"All this development has an immense human and ecological effect which, combined with climate change, will result in a human and natural tragedy," warns Roberto Iglesias-Prieto, a marine eco-physicist at the National Autonomous University of Mexico in Puerto Morelos.

Mangroves in the state of Quintana Roo are being lost at a rate of about 4% a year, an amount that represents a loss of 150,000 hectares a year. Whole beaches are being eroded by storm surges – Last year, Cancún had to spend $20m shipping in more sand.

At risk, says Iglesias-Preto, is the whole Mesoamerican reef system, which stretches 625 miles down the Yucatan pensinsula towards Honduras, and is the second biggest coral reef in the world after the Great Barrier in Australia.

Pollution from pig farms, golf courses, septic tanks, hotels dumping water from their laundries into the mangroves, new roads and the destruction of mangroves is all seriously degrading the water quality, he says. In addition, rubbish is dumped in the mangroves and deforestation sees topsoil making its way into the sea as sediment that asphyxiates sea life and damages the food chain upon which coral is reliant.

Nearly all the human waste water is "deep injected" below the drinking water aquifer, but while this sounded a good idea 20 years ago it is now found seeping up through the rocks into the aquifers, and flushed out into the sea where it attacks the reef.

"Nutrients from human urine and fertiliser from golf courses are now major threats to the reef," says Iglesias-Pietro.

Only about one third of the waste water from the tourist developments is treated, with the rest going straight to the aquifer, underground rivers or the sea.

This week, a study part-funded by the US Nature Conservancy which measures the quality of the reef in 350 places, showed that the quality of the corals is dropping alarmingly, with up to 80% of the live corals along much of the reef being lost in under 20 years.

"It's a really bad situation. The reef is not in good shape. The sea change in the corals came around six years ago. There has been an important drop in the amount of fish and in the corals," says Iglesias -Pietro.

He fears that climate change and accompanying sea level rises, together with more frequent storm surges, will devastate the reef completely, and lead to more damage on land. This year has seen major coral bleaching along much of the reef as sea tenmperatures rose to some of their highest-ever temperatures. Scientists expect wholesale die-offs in the future.

"Reefs can only grow in the right circumstances. If CO2 in the atmosphere rises to 450ppm [parts per million], the limit that politicians are prepared to go to, then there will be a major die-back of reefs around the world. Even a rise of 2C in temperature will be a major problem. We have to [keep] to 350ppm. It is the only way to stabilise the climate that is compatible with coral reefs. We are committed to a 1.5C risealready, anything more is very serious," says Iglesias-Prieto. "The game is not over, but it looks bad."

""If we [Cancún's hotel-owners] were dairy farmers we'd be the worst in the world – you do not kill your cow," says Paul Sanchez Navarro, director of the Centro Ecológico Akumal, set up by small-scale hotel owners to fight massive developments in the booming town, which threaten some of the best turtle breeding grounds in the world. "But that's what we are doing. Nature here is for sale, and nothing is being done to protect the sand, the sea and the forests."