al-Qarawiyyin Library in Fez, Morocco, is the oldest library in the world, but until last month, only researchers had access to it. Built in 859, the library was a beacon for scholars, poets, and theologians for hundreds of years, but in recent years it had fallen into terrible disrepair. Now a massive, three-year restoration effort hasn’t just revitalized the building – it’s opened an ancient center of scholarship up to a new generation of readers!

The center includes the large library, as well as a mosque and a university that may be the oldest degree-granting institution in the world. It was founded by Fatima El-Fihriya, a rich merchant’s daughter who dedicated her inheritance to building the center (a habit that ran in her family, as her sister, Maryam, was the sponsor of Fez’s Al-Andalus mosque). After the Moroccan Ministry of Culture received a grant from Kuwait’s Arab Bank, they chose Canadian-Moroccan architect Aziza Chaouni, who grew up in Fez, to head the project. Since 2012 she and her team have corrected structural damage and painstakingly updated mosaics to preserved the library’s original beauty, while also modernizing the space with an airy cafe, courtyard umbrellas and misting stations, and a museum highlighting al-Qarawiyyin’s history.

As the center expanded in the 10th and 11th centuries, new facilities were added on that ranged over several levels of surrounding hills, so one of the difficulties of Chaouni’s job was to get each individual space up to the same standard of insulation and wiring. In addition to that, she needed to restore centuries-old wooden beams, and the delicate mosaic tiles called zellige, and faced the additional challenge that comes with an ancient building, like say when you break through a wall and find a centuries-old sewage system.

Chaouni, a TED fellow, talked to their Ideas blog about the restoration:

While working hard to protect and preserve, Chaouni had to bring a sense of 21st-century pragmatism to the project. “I didn’t want the building to become an embalmed cadaver!” she says. “There has to be a fine balance between keeping the original spaces, addressing the needs of current users, including students, researchers and visitors, and integrating new sustainable technologies — solar panels, water collection for garden irrigation, and so on.” Another thing that needed updating: the library’s fountains. Embedded within the dense urban fabric of the UNESCO World Heritage Medina of Fez, fountains are part of the city’s vast and ancient water network. Chaouni took special care to restore the library’s original courtyard fountains, but where necessary, she created them from scratch, using local materials and construction systems, and introducing passive energy.

Another challenge was restoring the books themselves, as NPR relates. al-Qarawiyyin houses texts including a 9th-century Quran written in Kufic calligraphy, the original copy of Ibn Khaldun’s 14th Century Muqadimmah, a manuscript on Islamic jurisprudence by Ibn Rochd (known as Averroes in Europe), and the oldest known collection of Islamic hadith, which are early accounts of the life and words of the Prophet Muhammed.

The al-Qarawiyyin Library opened to visitors last month, so those of you who are Morocco-bound, be sure to check it out! And for the rest of us, you can learn more about the project here and here, and see more images of al-Qarawayyin’s beautiful mosaics here.