John Bruno remembers swimming through Florida’s coral reefs as a child in the 1970s. At the time, the reefs were dominated by elkhorn and staghorn corals, whose vivid, branching structures provided shelter for a smorgasbord of marine life. “It was like snorkelling over a wheatfield – vast, golden coral coverage as far as you could see,” says Bruno, now a marine biologist at the University of North Carolina.

Such days are gone. In just a few decades, the Caribbean’s reefs have collapsed. Golden beds of elkhorns and staghorns have disappeared and been replaced by thick mats of green algae. The proportion of the reef covered by live coral has plummeted from 50% in the 1970s to just 8% now, changing the fish communities dramatically. “Florida was a scary place to snorkel then, with hammerhead sharks, groupers and sailfish,” says Bruno. “Now, it’s like snorkelling in an aquarium.”

It’s not just the Caribbean. A third of reef-building corals are in danger of extinction, and reefs the world over are in serious decline. Even Australia’s Great Barrier Reef, long held as a shining testament to careful management, has lost the majority of its coral. “Ten years ago, we thought, ‘At least we have the [Great Barrier Reef]’, but even that’s starting to look pretty grim,” says Bruno. The question now is not whether things will get worse – they assuredly will – but whether we will lose our reefs entirely.

This is a chilling prospect. To lose the reefs would be to lose the planet’s most diverse ecosystems – habitats that make even tropical jungles seem impoverished. “I’m not dissing rainforests, but you could walk for kilometres and see a thousand beetles and a hundred birds, all variations on a theme,” says Rick MacPherson from the Coral Reef Alliance. “But in one square metre of a reef, you could get every animal phylum known.”

People would also suffer. More than 450 million people live close to coral reefs and rely on them as sources of tourism revenue and protein, and as buffers that dampen the energy of incoming storms. “There are humans that depend on them for a daily basis not just as a nice place to visit for a holiday,” says MacPherson.

One-two punch

Coral reefs are besieged on many fronts. “It’s not like trying to protect rhinos, where we know that the cause of the decline is poaching,” says Bruno. “There are so many things happening and at such big scales that local managers are largely powerless to do anything.”

Rampant overfishing removes herbivorous fish that keep competitors like seaweed and algae at bay. Cyclones and hurricanes physically batter the reefs, as do sticks of dynamite thrown by fishermen. Diseases, some of which are exacerbated by bacteria carried in human sewage, kill them off. The voracious crown-of-thorns starfish – an evil-looking sunburst of spikes – liquefies them with its extruded stomach. Agricultural run-offs flood the oceans with nutrients, spurring the growth of algae and plankton that choke the waters and block out sunlight. Coastal construction projects cut down trees that hold topsoil together, allowing rain to wash sediment into the reefs, smothering the corals.

But climate change is the “big bad”, according to McPherson. The greenhouse gases that we pump into the atmosphere create an insulating blanket that warms the seas along with the rest of the planet. In warmer water, corals expel the algae that live inside their tissues and produce nutrients by harnessing sunlight. Without these lodgers, the corals lose their energy supply and their bright colours, becoming bleached and weak. Meanwhile, carbon dioxide also dissolves in the oceans, making them more acidic and depleting the carbonate ions that the corals need to build their limestone fortresses. They dissolve faster than they can be rebuilt. Hit by the one-two punch of hotter and more acidic waters, the corals, homeless and starving, become more vulnerable to the other threats they face.

Last year, ecologist Roger Bradbury provided a bleak outcome in an opinion piece for the New York Times, saying: “There is no hope of saving the global coral reef ecosystem.” It was a controversial claim, and many other coral scientists see less doom and gloom. “The trajectory is one of decline across the board, but I see areas of incredible resilience in even the most severely hit ecosystems,” says McPherson. “There are so many places you can go where reefs, if not bouncing back, are at least holding their own in a suppressed state.”

Not all corals, or all reefs, are the same. Some, like those in American Samoa, have genetic advantages that allow them to thrive in shallower warmer waters, and some can recruit strains of algae that tolerate higher temperatures. Others grow in waters that are naturally acidic, where carbon dioxide seeps from the ocean floor. Corals can acclimatise to changing conditions, and there’s some evidence that reefs which bleach extensively for one year are better able to handle warmer waters a decade later. And reefs can change at the community level, shifting from sensitive species like the elkhorns to sturdy, robust ones like big boulder corals.

Buying time

Humans can help, particularly by setting up marine protected areas – underwater national parks – where fishing is verboten. Not only do they allow local reefs a chance to recover, but they can seed nearby areas with coral larvae. “That’s our best weapon in our arsenal right now for coral conservation,” says MacPherson, “but they need to be managed.” While a quarter of the world’s reefs already lie in marine protected areas, many are protected on paper only. Their restrictions have to be actively enforced, and they need strong support from local communities. All of this takes money, education, and expertise.

But in the end, the fate of coral reefs comes down to global warming. “We stop climate change, or that’s that,” says Bruno. “That’s a precondition for conserving almost everything.” Setting up marine reserves, fighting coral diseases, reducing pollution... all of these measures are about buying time.

And with enough time, corals prove to be remarkably resilient. They have lived through several climatic fluctuations, including waters that were far warmer and more acidic than those today. Over geological timescales, corals have endured at least five severe crises, but have never been entirely wiped out. Small populations survived in refuges to restart their rocky kingdoms during more hospitable climates.

The difference, of course, is that these ancient changes played out across millennia, whereas we are causing similar upheavals within the space of decades. Based on the latest report from the Intergovernmental Panel on Climate Change (IPCC), it is entirely plausible that the oceans might be three or four degrees Celsius warmer by the end of the century. “Honestly, if we got to that, most reefs would be toast,” says Bruno. “Usually, one degree of warming is enough to cook and kill most corals. There are very few species that could survive three or four.”

However, those figures are a global average. Not every patch of water will warm equally, and some cold areas may even become more conducive to corals. “We’d lose a lot of what we have,” says Bruno, “but we probably wouldn’t lose everything and we’d gain reefs in some places. We could get close to a world without corals... but reefs aren’t going to go extinct, probably under any global scenario.”

Corals, after all, live in a fine mosaic of salinity, temperature and light, where adjoining areas experience different conditions to their neighbours. It’s that patchiness that creates abundant niches for life, and has turned reefs into engines for evolution. And it’s that patchiness that might help to save them, even if we cannot. “That is my rationale for hope,” says MacPherson.

If you would like to comment on this story or anything else you have seen on Future, head over to our Facebook page or message us on Twitter.