You can set your watch to this glowing green worm orgy

And boy is it beautiful.

One of the Caribbean’s most engrossing natural spectacles happens every summer and autumn, just after sunset, when shallow waters transform into a fantastic green light show. If you ever get a chance to see it, never forget that you’re watching a giant, raunchy worm orgy happening in real time. And thanks to a new study published in PLOS ONE, we now know a few more secrets about how this marine sex party gets started—particularly that the party always starts on time, and that it hinges on a very specific, unique enzyme that gives the Bermuda fireworms (Odontosyllis enopla) their fiery glow.

Mark Siddall, a curator in the American Museum of Natural History’s Division of Invertebrate Zoology and a coauthor of the new study, first observed the Bermuda worms’ mating ritual up close back in 1995. “I was amazed,” he says. “It took me a few minutes to believe what I was seeing.’ He was immediately interested to learn more about how it worked and what sorts of genes conferred the species with such a remarkable luminescence. It would take two decades until he and his colleagues could finally get around to running an actual study.

Bermuda fireworms’ luminescence was first documented by Christopher Columbus and his crew in 1492, as “looking like the flame of a small candle alternately raised and lowered.” Scientists would identify the spectacle as a mating ritual in the 1930s, as occurring in the summer and autumn, at an eerily prompt 55 minutes after sunset, three nights after a full moon. It’s the females that light up and attract males.

“Imagine looking out over the water,” says Siddall. “It’s dark. The sun has set almost an hour prior. On a clear night the moon is up behind you, looking very full. Then you see something faint, down in the water waist deep, up close and personal, it’s unmistakable. The female worms, which are maybe an inch and a half long or so, are swimming in tight circles of maybe four inches in diameter, and they’re shedding light. They themselves are aglow but the glow surrounds them and trails behind them like luminous blue-green milk. Suddenly, and much fainter appears a tiny comet of light, streaking in a dead-straight trajectory on an angle from the bottom, a male homing in on a mate with incredible precision. And then it’s over. She’s gone.”

The glow is caused by an enzyme caused luciferase. The team ran an analysis of a dozen female worms’ transcriptomes—the complete set of RNA—and found the luciferase the Bermuda worms produce is unlike anything found in any other organism to date. It’s a completely distinct form, created by a gene family that is entirely unique to this species.

“Firefly luciferases clearly evolved from oxygenases with other functions that have nothing to with light,” says Siddall. “But these luciferases in Odontosyllis species, at the protein level, look like nothing else ever sequenced before.”

The team also identified genes that play a bigger role in the mating performance. The worms actually undergo a kind of metamorphosis called “epitoky,” which means the species is responding to signals that indicate what time of the day and month it is. Besides bioluminescence, the epitoky phase includes the enlarging of male worms’ eyes (so they can see the female glow more clearly), and modifications to organs that store and release sex cells.

Glowing before copulation might be kinky, but it’s also exceedingly useful as a mating ritual. The ocean is huge, and that makes it much harder for small organisms to find one-another. “If you’re going to toss your eggs and sperm into the water, it’s best to do it at the same time as others of your species,” says Siddall. “Now, if you can get the timing right, and be in the same place, so much the better.” Clockwork luminescence in the dark helps fulfill both of these conditions, greatly increasing the chance of successful reproduction.

There are also some practical applications for studying such a niche behavior by a niche species, like in the artificial production of light-producing enzymes. The Bermuda worm luciferase might prove to be more efficient to emulate than other kinds of proteins.

“The mating displays of these invertebrates are visually spectacular,” says James B. Wood, a marine biologist and president of the Coral Sea Aquarium in Florida who was not involved with the study. He thinks the results are certainly exciting, even if they aren’t all that shocking. “As a former faculty member at the Bermuda Institute of Ocean Sciences, I had the pleasure of introducing many students to this amazing natural fireworks show. The worms are more punctual than most people! Who knows what other secrets they keep?”