New research indicates that bioluminescence emerged in animals over 540 million years ago.
The study, which focused on an ancient group of marine invertebrates called octocorals, which includes soft corals, pushes back the previous oldest dated example of the trait by nearly 300 million years.
Bioluminescence is the ability of living things to produce light via chemical reactions.
Until now, the earliest dated origin of the phenomenon was thought to be around 267 million years ago in small marine crustaceans called ostracods.
Experts say it has independently evolved at least 94 times in nature and is involved in a huge range of behaviors including camouflage, courtship, communication and hunting.
Andrea Quattrini, curator of corals at the Smithsonian's National Museum of Natural History in the U.S., and senior author on the study, said: "Nobody quite knows why it first evolved in animals."
Lead author Danielle DeLeo, a museum research associate and former postdoctoral fellow, said: "We wanted to figure out the timing of the origin of bioluminescence, and octocorals are one of the oldest groups of animals on the planet known to luminesce.
"So, the question was when did they develop this ability?"
Along with Catherine McFadden, of Harvey Mudd College, Quattrini completed an extremely detailed, well-supported evolutionary tree of the octocorals in 2022, using data from 185 species.
Researchers were able to use fossil ages and their respective positions in the octocoral evolutionary tree to figure out roughly when the lineages split apart to become two or more branches.
With the evolutionary tree dated and the branches that contained luminous species labeled, the team then used a series of statistical techniques to perform an analysis called ancestral state reconstruction.
The data suggests that 540 million years ago the common ancestor of all octocorals was very likely bioluminescent.
That is 273 million years earlier than the glowing ostracod crustaceans that previously held the title of earliest evolution of bioluminescence in animals.
DeLeo and Quattrini suggest that the octocorals' thousands of living representatives and relatively high incidence of bioluminescence suggest the trait has played a role in the group's evolutionary success.
The findings are published in the Proceedings of the Royal Society B Biological Sciences journal.