Climate change spurs a cycle of underwater destruction in the reefs. As carbon emissions and greenhouse gases increasingly crowd the atmosphere, temperatures rise in the Earth’s water, too—about 1.5 degrees Fahrenheit. When sea temperatures heat up, coral expels the algae that lives inside them and turns white and brittle. This phenomenon, called coral bleaching, has decimated half the Great Barrier Reef—more than 67,000 miles of dead coral.

Reefs that have stronger microorganism presences have a higher damage threshold and are better able to tolerate disturbances like mass bleaching events, Palmer wrote. They can eventually trigger an immune response to avoid death—or at least prolong it.

Global warming is expected to wipe out 90 percent of remaining corals by 2050, cause for alarm, said biologist Ove Hoegh-Guldberg. She called coral reefs the “fabric of the ecosystem” that supports the people who cause its decay.

“You couldn’t be more dumb to erode the very thing that life depends on—the ecosystem—and hope that you’ll get away with it,” she told the Independent.

But some reefs are learning to adapt to damaging conditions. A June study found that certain pockets of reefs withstand the effects of warmer water and pollution better than their neighbors. These sections within reefs, called oases, were able to produce calcium carbonate structures to resist nearby disturbances, and some even repaired themselves.

Some reefs located in deeper trenches of the water are healthier since they can avoid surface storms and litter, and others are biologically tuned to rebuild themselves after damage. But the select survivors do not spell victory for the ravaged cnidarians.

“This glimmer of hope does not mean we can be complacent about the severity of the crisis facing most of the world’s coral reefs,” said lead author James Guest in a statement.

Reef deterioration could spark hidden hardship for the humans who depend on the habitats. Corals house somewhere between 1 to 9 million species, most of them undiscovered, as well as fish that an estimated 1 billion people rely on, the World Wildlife Fund said. The reefs protect shores from powerful storm waves by breaking them up before they’re able to erode the coast or flood land.

At least one-seventh of the world’s population benefits from reefs, and there’s evidence humans can repair the relationship: As of June, the Belize Barrier Reef Reserve is no longer considered endangeredafter government initiatives banned oil drilling in nearby waters. Reef restoration is already taking place in suffering reefs worldwide as scientists breed climate change–resistant coral in labs to transplant in decimated reefs, said David Vaughan, coral restoration program manager at the Mote Tropical Research Laboratory.

“It gets depressing, but we’ve made some great strides in coral restoration that I never would have thought possible even 10 years ago,” he told Vice’s Motherboard. “There’s definitely hope.”