The Great Barrier Reef is in trouble. Since 2016, rising ocean water temperatures caused mass bleaching events that have killed off nearly a third of the reef. But a new study in the journal PLOS Genetics suggests that the crushing environmental pressure of climate change could be driving coral to adapt to a warmer future.

Evolution usually takes thousands or millions of years, but the study, published Thursday, suggests that coral’s genetic adaptations are coming along a little more quickly than that. Using population-level analysis of coral genetics as well as computer modeling, a team of researchers in the U.S. and Australia found that genetic mutations for heat tolerance could spread through coral populations in the next 100 to 250 years. It’s evolution in action: As environmental conditions change, mutations in a population that turn out to be beneficial tend to become more common. Here’s the catch, though: The world might be changing more quickly than evolution can keep pace.

Acropora millepora is a stony coral that's common in the Great Barrier Reef. For this study, scientists 

Scientists have found that coral can be very sensitive to changes in water temperature, but at the same time, corals around the world thrive in very different environments. Therefore, the study’s authors suspected that genetic diversity and mutation could allow a coral species to adapt to habitat changes in its environment. Based on previous genetic research on Acropora millepora, a stony coral that’s abundant in the Great Barrier Reef, the researchers made a new computer model of the genetic migration rates of heat-tolerance alleles. Simply put, they simulated how effectively the genes for surviving in warm water could spread through the coral population. The results are promising.

“We find that high migration rates do not disrupt local thermal adaptation, and that the resulting standing genetic variation should be sufficient to fuel rapid region-wide adaptation of A. millepora populations to gradual warming over the next 20–50 coral generations (100–250 years),” write the researchers. This sounds like great news, since it suggests that coral could keep up with warming ocean waters. Unfortunately, the researchers report that these mutations could also make the coral more sensitive to fluctuating temperatures during that time. And since climate change is not a linear process, there are bound to be fluctuations over those 250 years.

As Inverse has reported, a heatwave in 2016 killed off 29 percent of the coral in the Great Barrier Reef, so it’s entirely possible that even the most rapid evolution won’t be able to keep pace with the immediate effects of climate change. But the researchers suspect it could at least extend the life of this natural marvel for a few decades.

Future studies will show whether the genetic migration occurs as the study’s authors predicted it and whether it translates to a better prognosis for the Great Barrier Reef. In the meantime, you might want to go check it out while you still have the chance.