With white-nose syndrome sweeping some parts of the country and killing millions of bats, there's rarely any good news to share about these cave-dwelling mammals.

But the bats of Bracken Bat Cave have reason to celebrate, thanks to a $20 million deal signed on Halloween to protect these animals from a housing development that would have threatened the world's largest bat colony.

Bracken Bat CaveLocated outside of San Antonio, the cave is home to the largest colony of Mexican free-tailed bats in the world with 15 million to 20 million bats.

Many of the bats are pregnant and nursing females are coming back from wintering in Mexico.

"They deposit the baby in what we call the nursery section of the cave, which is just millions of hairless baby bats, so when you look at it, it's a ceiling of pink, hairless baby bats," Fran Hutchins, coordinator of the cave for Bat Conservation International (BCI), told NPR. (And you can learn more about how the babies develop in the BBC video below.)

The cave sits within a preserve, but last year the large tract of land next to the preserve was slated to be developed into 3,500 new homes.

Conservationists were concerned that the lights from such a development would attract the bats, putting the population at risk.

"We would have had hundreds of bats congregating on the porches, around street lights, around swimming pools," said BCI Executive Director Andy Walker. "Baby bats that were either resting or sick, or older bats that were sick, might be found by family pets and brought into houses."

The 60-foot mouth of Bracken Bat Cave (above) is nestled at the bottom of a hill, and every night at 7:30, millions of bats fly out in search of insects.

"The emergence of these millions of bats as they spiral out of the cave at dusk for their nightly insect hunt is an unforgettable sight," said Andrew Walker, executive director of Bat Conservation International, in a news release.

At the height of summer, the Bracken bat colony eats 140 tons of insects each night. Nationwide, bats save farmers $23 billion annually in reduced crop damage and pesticide use.

"A nursing mom is generating at least her weight in milk every day, and she's going to eat her body weight in bugs every night," Hutchins said.

To protect the bats, BCI teamed up with the Nature Conservancy and San Antonio Councilman Ron Nirenberg. They worked for more than a year to raise funds to buy the land and create a buffer zone for the bat cave.

Their work paid off, the purchase was made, and now the Nature Conservancy will manage the property.

The nonprofit plans to build a visitor center to educate people about bats, as well as create hiking trails across the 5,000-acre swath of land.

To learn more about the Bracken Bat Cave and the animals that call it home, watch the video below.

You can also watch a live webcam of the cave.

Related on MNN:

Photo: (Bracken Bat Cave) U.S. Department of Agriculture/flickr