The settling dust from renovations and the banging of tools are not the ideal sights and sounds for a library, but this is no ordinary library.

Founded 12 centuries ago by a pioneering woman and nestled in the old medina of Fez, Morocco’s University of Al Qarawiyyin library is one of the world’s oldest repositories of historic writing, home to Islamic manuscripts treasured by historians. Yet it has been largely hidden from the public.

The architect leading its restoration, Fez native Aziza Chaouni, did not know it existed until she was asked to work on it.

King Mohammed VI is expected to inaugurate its reopening soon. Ms Chaouni is hoping it will mark an ideological change, too, and open to the public for the first time in its history.

Until now, the privilege of -using the library has been limited to scholars who sought formal permission, and authorities have not decided yet whether to change that.

From calligraphic designs on the walls to ceramic patterns on the floors and wooden carvings on the ceilings, the fingerprint of almost every ruling dynasty since the 9th century can be seen in the architecture.

A devout and wealthy Muslim woman from the Tunisian town of Kairaouan, Fatima Al Fihri, provided the endowment for building Al Qarawiyyin in the 9th century. Originally a mosque, it expanded in the 10th century to become a university, said Abdelmajid El Marzi, imam and administrator of the mosque.

The library houses a collection of manuscripts written by renowned thinkers from the -region, including Ibn Khaldun’s Muqadimmah.

The 14th-century historical work spent six months on loan to the Louvre Museum in Paris during the renovations, said library curator Abdelfattah Bougchouf.

Other texts include a 9th-century Quran written in Kufic calligraphy, and a manuscript on the Maliki school of Islamic jurisprudence by Ibn Rochd, also known as Averroes.

The manuscripts are kept in a secure room, with strict temperature and humidity control. They were not always kept like this, however.

“The original manuscript room door had four locks,” Mr Bougchouf said. “Each of those keys was kept with four different people. In order to open the manuscript room, all four of those people had to physically be there to open the door.”

Now, he chuckled, “all of that has been replaced with a four-digit security code”.

A renovation and expansion effort in 1940 opened up the library to foreigners and non-Muslims by creating a separate entrance.

Before that, the only way to access the library was via the mosque. To this day, non-Muslims are not allowed to enter the Qarawiyyin mosque.

“It was a sign of tolerance,” Mr Bougchouf said.

Since ascending to the throne in 1999, King Mohammed has called for restorations at Al -Qarawiyyin.

Ms Chaouni said she was pleasantly surprised when the culture ministry approached her in 2012 to work on the project – especially in a field dominated by men.

“I knew about the mosque, but never even knew there was a library there,” she said, despite having grown up in the city.

She specialises in restoring old buildings in a sustainable fashion, and is also trained as an engineer, with degrees from Harvard and Columbia universities.

The restoration is fixing a plumbing issue that threatened to drench the rare manuscripts in sewage water.

Ms Chaouni is also lobbying to open a public exhibition room for the first time – calling it “the biggest challenge of my soul” during the restoration project.

The culture ministry accepted the idea but bureaucratic control over the site shifted to the ministry of endowments and religious affairs. Ms Chaouni worries that this shift will squash her efforts. Authorities are also concerned about the cost of keeping the previous manuscripts secure.

Another way to improve access to the manuscripts is to digitise them, which the library has been doing, and about 20 per cent of the collection is now available in electronic form.

* Associated Press