This may be our best hope to save these vital habitats from the catastrophic effects of climate change.
Back-to-back heatwaves in the central Indian Ocean killed more than two-thirds of corals in two years, a study has shown.
But the research by the Zoological Society of London (ZSL) suggests some corals were more resilient to the high sea temperatures, which could provide hope for the important habitat as the planet warms.
Scientists studied reefs in the remote Chagos Archipelago of the British Indian Ocean Territory before and after two ocean heatwaves with unusually high sea temperatures, which came 12 months apart.
Surveying of the seafloor between 2015 and 2017 found that the high sea temperatures led to the loss of 70% of the hard corals, the study published in the journal Coral Reefs suggests.
In 2015, seawater temperatures around reefs in the territory were unusually high for nearly eight weeks, and the seafloor surveys before and after the heatwave saw live healthy coral cover fall by 60 percent.
Before the corals could recover, they were hit by another ocean heatwave in 2016, lasting for more than four months.
Although researchers were unable to assess the impact of the second heatwave across all the islands of the archipelago, data from the Peros Banhos Atoll show 68% of the remaining corals were bleached and 29 percent died.
This suggests around 70 percent of hard corals were lost between 2015 and 2017. But while the second heatwave lasted longer, fewer of the surviving corals were killed.
Researchers suggest the remaining corals are more resilient to rising temperatures and their ability to survive may be key to protecting reefs from rises in sea temperatures driven by global warming.
Hard corals are the building blocks of reefs which provide a home for around a quarter of all marine species and food, protection and income for some 500 million people worldwide.
Similar coral death and changes to the make-up of species in the reef were seen in the Chagos Archipelago following global coral bleaching in 1998, from which recovery took 10 years, the study said.
The relatively rapid recovery suggests the reef is highly resilient and the lack of disturbance it has from humans - as a result of the UK's controversial removal of local people to make way for a US military base - increases the probability the reefs will recover again over time.
But as these kinds of heatwaves become more frequent, the ability to recover will become "increasingly compromised", the study said.
Marine biologist and lead author, Dr Catherine Head of ZSL's Institute of Zoology, said: "We know it has taken about 10 years for these reefs to recover in the past but, with global temperatures rising, severe heatwaves are becoming a more regular occurrence, which will hinder the reef's ability to bounce back.
"Our data shows the event in 2016 was worse than in 2015, but it did less damage.
"We think this is because the 2015 heatwave killed off the more vulnerable species, and those that survived were more tolerant of hotter temperatures."
She said preliminary reports from April 2019 suggest another period of high sea temperatures has led to further coral bleaching in the British Indian Ocean Territory, though it is not yet known how serious it is.
"It is encouraging that reefs may have some degree of natural resilience, though further research is needed to understand the mechanisms by which some corals are able to protect themselves," she said. "This may be our best hope to save these vital habitats from the catastrophic effects of climate change."
Emily Beament is the Press Association environment correspondent.