In the village of Nanacamilpa, tiny fireflies are helping save the towering pine and fir trees on the outskirts of the megalopolis 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 45 miles (75km) east of Mexico’s sprawling capital city.



Piedra Canteada in Tlaxcala state isn’t a government-run park, but a rural cooperative 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 1990, community leader Genaro Rueda Lopez got the idea that the forest could bring tourism revenue from campers.



Business was slow for years. 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. Indeed, around the world, deforestation and urban growth are threatening the more than 2,000 species of fireflies with extinction.



Five years later, the park’s cabins and camp spaces are sold out weeks in advance, with the attraction especially popular among families with young children and couples seeking a romantic setting.



“The amount of fireflies you see is impressive,” said Carlos Landa, a Mexico City native who visited Piedra Canteada this week. “Something that I also find quite impressive is their synchronicity: to turn off and turn on, that is something really spectacular. It’s like Christmas in the forest.”

Fireflies seeking mates light up in synchronized bursts inside Piedra Canteada. Photograph: Rebecca Blackwell/AP

The cooperative of 42 families still cuts some trees, but has preserved over 1,560 acres (630 hectares).



“We log, we live from the forest, from cutting trees, but in an orderly way,” said Rueda Lopez, one of the cooperative’s founders. “It’s like a garden, you have to remove the branches yourself, the dry parts, the parts with diseases to really grow.”

He said they have plans to plant over 50,000 pine trees in the areas they log each year.



The idea has spread to nearby places in largely rural Tlaxcala, such as Granja Interactiva Salma, whose primary business is still crops like corn, wheat, broad beans and peas.

But they say firefly tours are a much needed source of extra income.



“We are trying to treat the whole area here with no herbicides, because it’s logical if we have insecticides, that could affect the fireflies,” said Hugo Brindis, a certified guide at Granja Salma. “We are talking to biologists and the people who make these chemicals to see which have less of an effect on fireflies and the forest.”



He said their operation is a reservation-only ranch and they are trying to reduce the amount of people who visit the area, 250 maximum on the weekends, to maintain a sustainable space in the forest.



In Piedra Canteada, the co-op acquired a small sawmill in 1998 so it could sell higher-priced cut lumber instead of just logs. The sawmill gives residents jobs and income beyond the three-month firefly season.



But the fireflies are now the main source of income.



“We have reduced our wood production, you can say by 60 or 70% to preserve the forest and have better amount of tourism,” said sawmill manager Salvador Morale.