Researchers have identified genes in algae that allow some corals to survive higher ocean temperatures without becoming bleached.

With the Great Barrier Reef and other important tropical reefs struggling to survive rising temperatures - while at the same time being damaged by our sunscreen - this is some much-needed good news for the coral ecosystems of the world.

Certain types of algae live inside corals as part of a symbiotic relationship that strengthen and protect both parties. Corals get their colouration from these algae, so when times are tough and corals are forced to kick out their algae tenants, they appear bleached.

Researchers from the University of New South Wales (UNSW) in Australia have found that algae growing in warmer temperatures could actually prevent corals from kicking them out, and this could protect them from bleaching as ocean temperatures rise.

The bright colour of tropical corals comes from a special type of algae, called Symbiodinium, which feeds corals via photosynthesis, and corals give them a place to live in return.

"Tropical corals cannot survive without the Symbiodinium algae that live inside them. These tiny, photosynthetic organisms can provide the corals with more than 90 percent of their food," explains lead researcher Rachel Levin.

But when water temperature heats up past a certain point, the Symbiodinium algae freaks out and starts releasing toxins called reactive oxygen species. These toxins include nasty compounds such as peroxides, which damage both the algae and coral.

When this happens, the coral kicks the algae out to stem the damage, but in the process turns bone white, leaving itself starving and vulnerable to destruction. Its only hope for survival is the water temperature dropping so it can be recolonised by new algae.

With each month breaking a new heat record right now, the chances of that happening aren't looking so good.

But the UNSW researchers think they might have a solution. They compared algae from a warmer location on the Great Barrier Reef to those from a cooler location, and found that when the warmer-climate algae starts releasing toxins under heat stress, it also turns on a gene that neutralises those toxins, which means that there's no risk of bleaching. And that's pretty huge news.

"For the first time, we have uncovered the mechanism that explains why some algae can withstand higher temperatures and avoid bleaching," said Levin. "We found they can switch on genes to produce proteins that neutralise the toxic chemicals."

The next step is to investigate if this gene will be able to help more temperate coral avoid bleaching, but it also gives researchers some interesting insight into how corals and algae deal under stress.

"As marine systems are increasingly challenged by multiple environmental threats, it is critical that we not just describe the severity of those threats, but also understand the capacity of marine organisms and ecosystems to adapt to and overcome those threats," said one of the researchers, Peter Steinberg.

The team also found promising evidence that both warm- and cooler-climate algae have other ways of dealing with stress.

"We also discovered that, under stress, both types of algae may switch from their normal asexual mode of reproduction to sexual reproduction," said Madeleine van Oppen.

"Sexual reproduction helps speed up evolution and may allow some algae to adapt quickly enough to tolerate the rise in sea surface temperature. This could be a natural 'golden ticket' that allows some corals to survive a bleaching event."

It's been a tough couple of months for nature lovers, with 93 percent of the Great Barrier Reef suffering bleaching earlier this year and crown of thorns starfish munching through the reef, but there's still hope. Despite all the bad news, researchers are looking into ways we can help minimise bleaching of coral reefs, so we'll hopefully have these amazing places on the planet in the future.

This research was published in Molecular Biology and Evolution.

UNSW Science is a sponsor of ScienceAlert. Find out more about their world-leading research.