The world’s oldest working library at the al-Qarawiyyin University in Fez, Morocco is once again open and ready for visitors, having been closed for massive restorations since 2012, according to Tech Insider.

The al-Qarawiyyin library is part of an educational complex that began as a mosque in 859. Originally founded by Fatima El-Fihriya, the wealthy daughter of a Tunisian immigrant, the historic site was meant to be a center of knowledge and worship. By the 10th century, the university portion of the site, along with the library proper had been established in full. The multiple courtyards and ornate interiors were decorated with lovely Arabesque calligraphy and tile work adorning the floors, walls, and ubiquitous arches, making it a beautiful architectural, as well as academic artifact.

But after operating for over a millennia, the state of the al-Qarawiyyin library had severely declined by the 21st century. Cracks in the walls, unregulated humidity, and even infiltrating sewage were threatening to ruin the ancient collection of texts, which addressed everything from law to astronomy, dating back as far as the 7th century, according to Even the beautiful courtyard fountains and mosaics have begun to fall apart. The library had been closed to the public for years when architect Aziza Chaouni was commissioned to restore the site.

Now, after years of delicate work on the ancient library, Chaouni’s efforts have paid off, and the site is once again open to the public, as of May. The library looks almost as good as 9th century new. Chaouni made sure to use as authentic as possible materials in fixing the site, and what she couldn’t repair, she simply recreated. In addition, she took special care to make sure that the library is actually usable to researchers and scholars as well, adding new furniture and solar panels for sustainable power.

The library is already receiving a number of tourists who can now wander the same stacks and sprawling courtyards that scholars first did over a thousand years ago.