It is an image you may be familiar with: an animal with pointed ears and outspread wings with a conspicuous claw on each one. The world’s only flying mammal is not only the emblem of an iconic superhero, but also happens to be one of the symbols of the Valencia Region. After years of decline here, the region’s 2014 census counted a total number of 24,000 bats, compared with 16,000 the previous year. Finally, some good news for the totemic animal of the Mediterranean provinces of Alicante, Valencia and Castellón.

This recovery is due to a number of factors, but chief among them was a decree regarding Special Conservation Areas that involved measures to protect the region’s caves, particularly the use of fencing and other enclosures to limit human interference. There has also been a boost to endangered species of the animal through an official policy of encouraging it to control unwanted insect populations.

An example of this are the nest boxes put up by Alicante City Council as roosts for bats and swallows, who feed on mosquitos in the La Marjal Park area. The idea is to reduce bothersome insects without the use of insecticides, as well as to promote populations of these two winged beasts. Although there are no official data on the scheme’s progress, a similar initiative in Torrevieja, another municipality in Alicante province, has been a success. Of the 37 nest boxes installed around the town, more than 60% are occupied.

It is not just the local authorities here on Spain’s east coast that are resorting to bats in times of need. The Bodegas Enguera winery, as reported in the local newspaper Levante, asked its experts to come up with a way of fighting the pests that fed on their vines, but without using chemical products. The solution they came up with was mammalian: bats are eager predators of the insects that harm grape harvests. This is one more way in which the tide is turning for an animal whose numbers had been affected by deforestation, insecticides and poor management of the caves it so loves.

The bat entered the history of this region along with Jaime I of Aragon in the 13th century. Legend tells that the king was camped together with his army near Valencia while attempting to wrest the city from its Muslim rulers, when a bat decided to nest in the highest part of the royal tent. The monarch ordered that the bat be allowed to remain.

One night, while the encamped army slept, a drumming sound woke the king. Irked, he sent his guards to discover the source of the noise. At that moment, they happened upon a surprise attack by enemy troops and, after the alarm was sounded, the intruders were repelled. When the king sought the person responsible, he was surprised to be told that it was the bat, which had repeatedly flung itself against the tent to warn the commander of the forces. In gratitude, the king had a bat placed at the highest part of Valencia’s coat-of-arms. It seems fitting that the region continues to promote the coexistence of humans and bats, even though these days this is done through the liberal use of the urban nest box.