Some coral reefs may be able to adapt to rising ocean temperatures, a consequence of global climate change.
Coral live in close partnership with algae, but lose the algae when temperatures rise, causing death.
Australian scientists have discovered that coral may be able to exchange their algae for varieties which can survive at higher temperatures.
They say this provides a "nugget of hope" for some reefs threatened by climate change.
"While this is likely to be of huge ecological benefit," write Ray Berkelmans and Madeleine van Oppen, "it may not be enough to help these populations cope with the predicted increases in average tropical sea temperatures over the next 100 years.
"It may, though, be enough to buy time while measures are put in place to reduce greenhouse gas emissions."
Drs Berkelman and van Oppen, from the Australian Institute of Marine Science (Aims) in Townsville, report their findings in the scientific journal Proceedings B, published by the UK's Royal Society.
Most warm-water reefs consist of colonies of coral polyps living in a symbiotic relationship with algae.
Polyps provide carbon dioxide for the photosynthetic algae, which return oxygen and carbon.
Rising sea temperatures can break the relationship. The algae are expelled, and coral lose their colour, becoming bleached; the breakdown can be fatal to the reef.
In 1997/98, a strong El Nino event raised ocean temperatures in large swathes of Asian and Australasian waters, causing widespread bleaching. Globally, it is estimated that 16% of reefs were lost in the one season.
Many scientists believe that global climate change will also raise sea temperatures, but over much longer timescales, potentially extinguishing entire reefs permanently.
Research indicates that parts of the Indian Ocean could see all their coral die within 20 years.
A recent study in Australia predicted that most of its Great Barrier Reef could be devoid of live coral by 2050.
Some coral associate only with one type of symbiotic algae, or zooxanthellae.
Others are more promiscuous, and it has been thought for some time that these may be able to switch to more heat-tolerant varieties as waters warm - a theory which the new Australian research apparently confirms.
Scientists took samples of Acropora millepora, a common Great Barrier Reef coral, and transplanted them from cooler to warmer waters by taking them to locations further north along the reef.
Some of the transplanted populations responded by taking on algal varieties able to tolerate higher temperatures.
These populations developed the ability to tolerate even higher temperatures generated by heating sea water artificially in the laboratory.
At 30 Celsius, virtually all samples survived; at 32 Celsius, only those which had taken on heat-tolerant zooxanthellae could do so.
"This has been hypothesised for a long time, but to my knowledge this is the first time it has been shown that a coral will change its clade, or type, of zooxanthellae in response to temperature-induced stress," commented Jerker Tamelander, coordinator of the Asia Regional Marine Programme of IUCN, the World Conservation Union.
"You could assume it will happen with different types of coral," he told the BBC News website.
"And if is happening on a large scale on many species on many reefs, it could change some of the predictions made; but we haven't been able to test that, so it is just speculation at this stage."
The difference between the maximum temperatures which different types of algae can tolerate is about one to one-and-a-half Celsius.
The Intergovernmental Panel on Climate Change (IPCC) predicts that tropical sea surface temperatures will increase by up to 3 Celsius over this century.
So even if coral all over the tropics can adopt new algae, it would have only a limited impact on the progress of decline.
"It is unclear how many coral species, and populations within species, are likely to benefit from this acclimatisation mechanism and hence what the overall implications are for coral reefs," observe Drs Berkelmans and van Oppen.
The prospects of doing something more radical with the recent finding, by deliberately stimulating the uptake of different algae or even engineering new forms resistant to higher temperatures, are limited, according to Jerker Tamelander.
"I think that's something that may be technically feasible on a small scale," he said, "but on a broader level it is unfeasible.
"Coral reefs are huge and many are inaccessible. They are complex environments which would respond better to protection than some interventionist solution."
Comprehensive protection would involve more than dealing with rising ocean temperatures.
Increased levels of carbon dioxide in the atmosphere are slowly leading to more acidic oceans, which may be detrimental; and reefs are also damaged by exploitative fishing, irresponsible tourism and excavation for building materials.