The copper craft makers in Seffarin Square in the historic district of Fez, Morocco, bang out designs on platters and shape copper pots to a rhythm.
Called the medina, neighborhood streets lined with domes and archways take you back through the history of the dynasties and occupiers that ruled Morocco from the 9th century on. At the center of the square is the Qarawiyyin Library, founded more than a millennium ago.
We've heard much recently about the destruction of grand historical sites in places like Syria and Iraq, where war and ISIS wreak havoc on the present and the past. But this library has been lovingly restored to protect ancient manuscripts by some of the greatest Islamic thinkers.
It's part of what the United Nations calls the oldest operating educational institute in the world. The complex started as a mosque in the 9th century and expanded to include a university and library in the 10th century. It's defined by beautiful courtyards centered around fountains.
Inside the library are ornately carved wooden window frames and archways, colorful ceramic tile designs on the floors and elegant Arabic calligraphy engraved in the walls. The high ceilings in the reading room are adorned with gold chandeliers.
"There is a big restoration because there was a need for the building and the manuscripts to be preserved," said Abdullah al-Henda, part of the restoration team that's been working on the restoration since 2012. "There were problems of infiltration, of sewage, degradation of walls, some cracks in different places in the library."
The library holds some 4,000 manuscripts: Qurans that date back to the 9th century, the earliest collection of Islamic hadiths — the words and actions of Islam's prophet Mohammed — and an original copy of the great Muslim thinker and historian Ibn Khaldun's Muqaddimah.
And Henda points out the library connected the east and the west.
"It was a bridge of knowledge of researchers, between Africa and between the Middle East and Europe," he said.
When the library opened, it created a space for non-Muslims and Muslims to exchange ideas. In the 10th century, Pope Sylvester II, known as a prolific scholar, was one of the visitors.
And notably it was all made possible because of a woman, Fatima al-Fihri. She was the pious daughter of a wealthy merchant who provided the money to found the mosque, the university and the library.
That doesn't surprise Henda.
"Ladies are half of society," he said. "She was descended from a rich family, she has the capacity, she has the ability, the money to do it and the will."
It's a small reminder of the importance of women in the history of Islam. And it's echoed in the fact that a Canadian-Moroccan woman, architect Aziza Chaouni, led the restoration.
Now the library has a new gutter system and solar panels. Air conditioner units are tucked behind wooden carvings that match the aesthetic. And finally, the delicate manuscripts are protected in a temperature- and humidity-controlled room with a modern security system.
Henda says the library, which will reopen officially in May, is more than just a building.
"We have to preserve it. We have to restore it because it's our identity," he said. "It's our archives. It's our memory."