June 25, 2026, 11:25 am | Read time: 3 minutes
It is considered one of the most beautiful libraries in the world: the library of the Palácio Nacional de Mafra in Portugal. Its magnificent architecture is not the only thing that makes it unique. A large colony of bats lives among the historic bookshelves, becoming active at night to protect the precious collections.
Located in the National Palace of Mafra, about 40 kilometers northwest of Lisbon, is one of Europe’s most impressive book collections. The library houses valuable works that testify to Portugal’s intellectual flourishing in the 18th century. With its artistic Rococo-style design, it is considered an architectural masterpiece and attracts visitors from around the world. Here, you will learn why bats serve as protectors of the books and why a trip to Mafra is worthwhile.
Magnificent Library in UNESCO World Heritage Site
The Palácio Nacional de Mafra is one of Portugal’s most significant buildings. The monumental complex includes a palace, a basilica, a monastery, and extensive gardens. It was designed by the German architect Johann Friedrich Ludwig and completed in 1755, according to the official record.
The basilica houses a significant international art collection with Italian sculptures and works by renowned French painters from the 1730s. Its architecture is reminiscent of the great churches of Rome. In 2019, UNESCO added the building complex to the World Heritage list, recognizing it as an extraordinary architectural, technical, and cultural achievement.
On the second floor of the palace, the library stretches an impressive 88 meters in length. Various colored marble, intricately crafted wooden shelves, and richly decorated ceilings create an especially elegant atmosphere. Ceiling paintings featuring figures from literature and mythology, including Moses and Apollo, add extra splendor to the room. Around 30,000 volumes document the Enlightenment’s world of ideas, making the library a significant testament to European cultural history.

Bats as Pest Control
The quirky feature for which the library is also known is its permanent residents. During the day, about 500 bats hide behind the shelves, waiting for their nighttime mission. Then they fly through the library, hunting moths, beetles, and other insects that could endanger the historic books.
The centuries-old works, with their delicate paper pages and brittle leather bindings, are extremely vulnerable to pest infestations. To protect the valuable collections and the historic wooden shelves, Mafra has relied on this natural form of pest control since the 19th century. The bats have proven to be both unusual and effective helpers.
Tourists can visit the palace and thus the library daily–except on Tuesdays. Regular admission is 15 euros. However, the bats remain hidden from visitors, as they stay in their hiding places during the day and only become active after the site closes.