Mafra, in Portugal is 88m (288ft) long, making it the longest monastic library in the world, narrowly beating Admont to the title. Housed in a monastery within a royal palace, the library was originally intended to be gilded and to have an ornate painted ceiling, in keeping with other libraries of the period, but its long and protracted construction period meant that both the style of architecture and the purpose of the library changed during construction. This is one of two libraries in Portugal that house colonies of bats which live behind the bookcases and feed on the insects which might otherwise eat the books.