Aaron Fairweather remembers seeing fireflies as a child for the first time, a swarm of twinkles flashing across the surface of a lake near Saint John, N.B., illuminating a summer's night.

Fairweather, who uses they/them pronouns, was fly-fishing with their father at the time. Now, the research associate at the University of Guelph fears that threats such as climate change and light pollution could snuff out these luminescent insects, depriving future generations of the "magic" they experienced as a child.

"It's really sad to see that one of these childhood marvels -- these insects that make us say, 'Isn't the world incredible? These organisms can produce their own light and see how beautiful the natural world is' -- we're losing them."

While the number of fireflies has remained steady this summer compared with last year, overall numbers of these bugs have decreased by about 35 per cent over the last five decades, Fairweather said.

There are 173 species of fireflies in North America that have been identified by scientists, and 29 are found in Canada, said Candace Fallon, a senior biologist with the American conservation group Xerces Society, which is lobbying the United States government to extend endangered status to fireflies.

Fallon is the lead author of a study published in 2021 in the journal PLOS One, suggesting that up to one in three firefly species may be threatened with extinction and that some species might disappear before they are even discovered.

Wingless firefly females -- and sometimes larvae -- are known as glow worms, while the flying beetles -- usually male -- are known as fireflies.

Among the 173 known species of fireflies is a type of glow worm called the black ghost, found in British Columbia. It measures between five and seven millimetres but not much else is known about this creature, Fallon said.

"(Glow worms) are more cryptic animals," she said. "(Black ghost) is data deficient. We don't know anything about its habitat associations other than it's been found in a forest along a river."

Fairweather said insect populations worldwide are declining, and fireflies are seeing a similar fate. What people don't realize, they said, is the benefits that fireflies have for gardens and waterways. The fireflies that people see in their summer garden are the adults of the species with a lifespan of a few weeks; the bugs spend up to two years underground as larvae.

"(Firefly) larvae are quite ferocious predators," Fairweather said. "They'll feed on worms and slugs and snails, and especially mosquito larvae in some ecosystems."

The larvae are unsung and unseen heroes of gardens and waterways because they keep the ecosystems clean, they said. So it worries scientists when a warming planet dries out the earth and scorches forests, or when human activity fills swamps to create buildings -- the homes of these tiny animals are destroyed.

In the village of Nanacamilpa, fireflies are helping save the towering pine and fir trees on the outskirts of Mexico City. Thousands of them light up a magical spectacle at dusk in the old-growth forests on reserves such as the Piedra Canteada Park, about 75 kilometres east of the Mexican capital.

Piedra Canteada in Tlaxcala state isn't a government-run park, but a rural co-operative that has managed to emerge from poverty and dependence on logging with the help of the fireflies. For years, economic forces, including low prices for farm produce, forced rural communities like Piedra Canteada to cut down trees and sell the logs.

Then in 2011, community members realized the millions of fireflies that appear between June and August could draw tourists from larger cities where few people have seen them in significant numbers. Camp spaces are now sold out weeks in advance to families who come from all over the world.

"Fireflies could be a huge source of ecotourism," Fairweather said. "From May to June, within Canada, you can go out to most bogs or fields and see thousands of them. I think it's just an incredible model that's untapped."

Light pollution, Fallon said, is one of the biggest threats to firefly populations, especially since 75 per cent of these bugs are active at dusk or after dark. Fireflies use their light to find a mate, she said.

Firefly species have various twinkling patterns: some emit fast bursts of flashing light, others have a burst of light and go dark; female glow worms, meanwhile, emit a soft shimmer while the male swoops in to find a mate, she said.

But this courtship is interrupted by bright, artificial lights such as those from buildings, porches or even passing vehicles, which can drown out the signals these insects use to communicate and find each other, ultimately affecting reproduction for the species, Fallon said.

In Muskoka, Ont., Fairweather said the local government asked residents this year to turn off porch lights when not in use, to help fireflies.

There is a painful lack of baseline data on fireflies, Fallon said.

"They're so well known, there's so much nostalgia around them. But they're kind of othered," she said.

"People just think of them as these magical creatures that light up the night. But then don't connect it to the fact they're part of our biodiversity."

Fairweather said funding for research into fireflies is hard to come by because of an "absence of thought."

"It's 'oh, this is just a staple from my childhood. It's always going to be there,"' they said.

"Who knows? Maybe in another 20 to 50 years, we won't be able to show any examples of fireflies. We have these stories, but where are these organisms now? Or are they a myth?"

This report by The Canadian Press was first published July 15, 2023.

-- With files from The Associated Press.