If you’ve spent a summer night by the lake relatively unmolested by black flies or mosquitoes, you might want to thank a bat. If you can find one.

That’s getting more difficult, in Maine and an increasing number of states, because of a fungus known as white nose syndrome. Since it was first found in 2007, white nose syndrome has spread to at least 25 states and five Canadian provinces, killing more than 5.7 million bats.

Researchers are still trying to figure out how the fungus kills bats, and how to stop it. They need to work quickly, as the bat population has all but disappeared in many of the areas where the white nose syndrome has taken hold, and further decimation could have devastating, and as yet unknown, impacts on the ecosystem as a whole.

White nose syndrome was first discovered in Albany, N.Y., in 2007. It has since spread to much of the eastern half of the United States, infecting many different species and killing 90 percent to 100 percent of bats in some areas, according to the U.S. Fish and Wildlife Service.

In Vermont’s Aeolus Cave, almost all of the 800,000 bats were killed after the disease first hit in 2008. The number of northern long-eared bats hibernating in Connecticut dropped from hundreds to a dozen or so after white nose syndrome reached there in 2011. The population has been similarly devastated in Ohio and Indiana, and the fungus has now been found spreading west, to Missouri, Mississippi and Arkansas.

In Maine, white nose syndrome was first found in 2011 in Oxford County. There has been a confirmed case in Hancock County and another likely case in Piscataquis County, though experts say it probably has spread throughout much of the state.

The full impact here is not known. However, bat counts, conducted in Acadia National Park by officials there and throughout the state by Maine Audubon, have pointed to significantly reduced populations.

The threat of extinction, to one or more bat species, is very real in North America, biologists say.

One bat can consume thousands of insects in a night. Their loss could trigger an increase in not only mosquitoes and black flies, but other pests as well. That could, in turn, ease the transmission of insect-borne disease.

The impact on agriculture could be great, as well, with some researchers putting the toll in the billions of dollars nationwide.

But as many biologists point out, it is difficult to tell what will happen when one animal is almost completely removed from the ecosystem.

The U.S. Fish and Wildlife Service does not want to find out. The agency has dedicated more than $17.5 million to research and mitigating efforts since 2008. It has funded eight projects at universities in six states. By April of next year, the service is expected to announce whether the northern long-eared bat will be classified as endangered, pending more research on the impact of white nose syndrome.

There is some hope, however small. The bat population at Vermont’s Aeolus Cave has started to rebound slowly, and researchers hope that may portend a wider renaissance. And education for hikers who are around bat habitats, who can carry the fungus from one cave to another, is helping to slow the spread of the fungus.

But white nose syndrome is working on its own timetable. If a solution isn’t found soon, we may find out too late that its lasting impact is worse than a ruined night at camp.