Fireflies are in deep trouble, with many species facing extinction due to habitat loss and exposure to pesticides, according to the first major review of their global status, published Monday.
Adding irony to injury, one of nature's most entrancing spectacles is also being snuffed out by artificial light pollution, researchers reported in the journal BioScience.
More than 2,000 species of fireflies - which are, in fact, beetles - illuminate wetlands, marshes, grasslands, forests and urban parks worldwide.
A few, such as the Big Dipper in the United States, seem to be flourishing.
"Those guys can survive pretty much anywhere," said Sara Lewis, a biologist at Tufts University in Massachusetts and lead author of the study, based on a survey of dozens of firefly experts.
But other varieties - from the glowworms of southern England to Malaysia's synchronous fireflies and the Appalachian blue ghost, both of which draw tourists — are being extinguished by humanity's ever-expanding ecological footprint.
"Some species get hit especially hard by habitat loss because they need specific conditions to complete their life cycle," said Lewis.
The Malaysian firefly (Pteroptyx tener), for example, lives during its larval phase in riverside mangroves, many of which have been ripped up to make way for palm oil plantations and fish farms.
The glowworm (Lampyris noctiluca) has another problem - females are flightless, which means that can't simply buzz off to a new location when their habitat is swallowed by a suburb, commercial crop or country road.
Other species of fireflies, which eat only during their larval phase, are "dietary specialists," meaning they subsist on one or two kinds of snail, earthworm or other soft-bodied prey.
When fruit orchards in Mediterranean Spain are abandoned or give way to urbanisation, so too do the snails preferred by aptly named Lampyris iberica, leaving the firefly larva nothing to eat.
Flashing through the gloom
Adult Pteroptyx in Malaysia, meanwhile, gather for nightly courtship displays in specific trees located along mangrove rivers. Many of those trees have been cut down.
Of 10 possible drivers of extinction, experts fingered habitat loss as the top threat everywhere - except east Asia and South America.
In those two regions, artificial light was seen as the biggest menace to the world's luminescent beetles.
"In addition to disrupting natural biorhythms, light pollution really messes up firefly mating rituals," said co-author Avalon Owens, a doctoral student at Tufts.
Many species of firefly depend on their ability to light up to find and attract mates.
To make matters worse, that window of opportunity is very narrow: while the firefly larval phase lasts months to years, adults typically live only a few days.
The twinkling beetles are so focused on reproducing that they don't even eat.
The survey found that fireflies are also being decimated by commonly used insecticides, the third major threat.
"Organophosphates and neonicotinoids are designed to kill pests, yet they also have off-target effects on beneficial insects," the researchers wrote.
Fireflies light up by triggering a chemical reaction - involving oxygen, calcium and an enzyme called luciferase - inside special organs in their abdomen, a process called bioluminescence.
Their otherworldly glow has been an enduring source of fascination.
But firefly tourism - long popular in Japan, Malaysia and Taiwan - has also taken a toll, with fragile ecosystems damaged by too much foot traffic.
The plight of fireflies at the beginning of the 21st century add a new layer of meaning to lines written more than a century ago by Canadian poet Bliss Carman.
"And the fireflies across the dusk, Are flashing signals through the gloom," he wrote.
While climate change is not seen as a current threat, future sea level rise and drought also could accelerate the drive towards extinction.
The dozen authors contributing to the study are all affiliated with the Firefly Specialist Group - set up in 2018 - of the International Union for the Conservation of Nature (IUCN), which compiles the Red List of threatened species.