Australian scientists have found that not only is coral more resilient than first thought, its secret defence weapon contributes to the bad smell that can come from oceans.
Researcher Cherie Motti's nose led her to the discovery.
"I was handed this sample. I opened the jar and this smell of the ocean came out and I got a big whiff and I was quite shocked because I wasn't expecting that smell at all," she said.
That smell belongs to an antioxidant produced by coral, in the form of a sulphur gas, that helps keep it cool when sea temperatures rise.
It was believed algae in the ocean was the only factor creating the stench when temperatures rose.
However, Dr Motti says coral also lets off a stink that in turn helps to regulate its environment.
When the water gets warmer, coral releases more molecules. The sulphur gas from these molecules helps form clouds that then reflect the sun's heat back into space, cooling the surface temperature of the sea.
"What we're showing is that this sulphur molecule is actually being produced in higher concentrations when the coral is being bleached and that enables the coral to survive a lot longer," Dr Motti said.
"What it means is that the coral, when it is both a juvenile before it is starting to grow and when it's an adult under severe stress, it actually has the ability to look after itself."
Dr Motti warns, however, that too many stresses on coral can break that cycle.
"For example, it becomes incredibly hot. We have a flood plume for example that might affect the immunity or the health of the coral, that's when things start to go wrong because then the coral has got to play catch-up," she said.
"It might not be able to produce enough of this gas therefore the cloud won't form, therefore it'll get hotter."
The tougher environmental conditions get, the harder it is for coral to survive.
"It's like any normal person, you have one stress and you don't feel well, but when you have a number of stresses coming at you all at once, it becomes more and more difficult to survive that," Dr Motti said.
"The coral faces exactly that problem.
"What we're saying is that the coral has the ability to deal with increasing temperature. Whether this ability to produce this molecule enables it to be able to be more resilient against these other stresses we just don't know yet."
Scientists from the Australian Institute of Marine Science teamed up with researchers in Queensland, Western Australia and the ACT for the study.
The research will be published in the science journal Nature.