The mystery emerged in 2015, when nearly 10 percent of the seemingly healthy mangrove forest along northern Australia’s Gulf of Carpentaria suddenly died. Scientists initially blamed this crucial ecosystem’s die-off solely on an unusually strong El Niño, a weather pattern that periodically siphons water away from the western Pacific and lowers local tides. But a new study published in Science Advances reveals that El Niño had a stealthy accomplice: the moon.

Researchers analyzed more than 30 years of national satellite data to narrow down the suspect list. “It was just the most phenomenal data set,” says the study’s lead author Neil Saintilan, a biogeographer at Macquarie University in Australia. A pattern quickly emerged—about every 18 to 19 years, mangrove tree cover along the Gulf of Carpentaria thinned out significantly before bouncing back to normal within a couple of years. And roughly nine years after each such die-off, the mangrove canopies became unusually dense.

That regularity gave the researchers an important clue. “Nature’s usually pretty chaotic,” Saintilan says. “If something is superregular, it’s probably some kind of orbital cycle.”

“The 18.6-year cycle is essentially driven by what we call a ‘wobble’” in the moon’s orbit, says climate dynamics researcher Sophie Wilmes, who studies tides at Bangor University in Wales and was not involved in the mangrove investigation. Lunar gravity affects daily ocean tides worldwide. As the moon’s orbit oscillates, or wobbles, over 18.6 years, it creates regular, sustained periods of unusually high or low tides in certain places. This effect is especially strong in the Gulf of Carpentaria; its low tides can drop by an average of 40 centimeters because of its location relative to the equator and the shape of Australia’s coastline.

Indeed, the researchers found that Australia’s 2015 mangrove die-off fell 18 and a half years after the previous one. And because of the 2015 El Niño, the trees were hit with a low-tide double whammy: El Niño decreased tides an additional 40 centimeters, a fatal blow to water-loving mangroves.

Although the orbital mechanics of the moon’s wobble have been studied extensively, “there hasn’t been much work that looks at its impact on ecology,” Wilmes says, “so it’s a really cool paper.” In the future, Saintilan and his colleagues hope to look at whether this phenomenon affects mangrove forests in other parts of the world. They also want to study how sea-level rise driven by climate change will alter this natural ecological pattern. A moderate rise might mitigate some of the tidal drop, helping to preserve mangrove forests, but an extreme rise could drown the trees at the cycle’s highest tidal point. “We might be able to anticipate when—or if—we’ll start to see some big problems in terms of mangroves coping,” Saintilan says.