Fes is the oldest of Morocco's imperial cities and the most bewildering: a walled medina of narrow lanes where cars cannot go and donkeys still carry the loads. It is also a city of refugees, scholars and craftsmen, home to one of the oldest centres of learning in the world, and one of the great restoration projects of our time.
This is the bright side of Fes, in roughly the order it happened. Several of its proudest stories rest on later chronicles rather than documents, and we say so where they do. Every chapter ends with something you can go and see. Most of the city's mosques are closed to non-Muslims; we note where you can go in and where you can only look through the door.
818 and 859: A City Built by Refugees
Fes was founded by the Idrisid rulers around 789 and 809. Within a few years it took in two waves of refugees. In 818 families expelled from Córdoba, in Muslim Spain, after a failed revolt settled on the east bank of the river; soon after came families from Kairouan, in today's Tunisia, who settled on the west bank. The two quarters, the Andalusian and the Qarawiyyin, still carry their names.
According to a chronicle written in the 14th century, two sisters from a Kairouan merchant family used their inheritance to found a mosque in each quarter in 859: Fatima al-Fihri the Qarawiyyin, and her sister Maryam the Andalusian Mosque. Historians treat the story with caution, because it was written down more than four centuries later and some think it too neat to be true. But it is the story Fes tells, and it has made Fatima a symbol of women's learning across the Muslim world.
The great carved gate of the Andalusian Mosque, rebuilt in the early 13th century. Image: Robert Prazeres, CC BY-SA 4.0, via Wikimedia Commons.
Where to see it today: the monumental tiled north gate of the Andalusian Mosque, with its carved cedar canopy, in the Andalusian quarter. The mosque is closed to non-Muslims, but its original minbar of 980 is on display in the Al Batha Museum (see below).
A detail of the 10th-century minbar of the Andalusian Mosque, now in the Batha museum. Image: R Prazeres, CC BY-SA 4.0, via Wikimedia Commons.
859 and After: Al-Qarawiyyin
The Qarawiyyin grew from a neighbourhood mosque into one of the great mosques of North Africa and a centre of learning for scholars from across the Muslim world and beyond. Guinness lists it as the oldest existing, continually operating educational institution in the world, and UNESCO calls it the oldest university. Historians add a caveat: for most of its history it was a mosque with teaching circles, a madrasa rather than a university in the European sense, and it became a modern state university only in 1963. Either way, people have been studying here for more than a thousand years.
Among those who taught or studied in Fes were the historian Ibn Khaldun, who worked at the Marinid court in the 1350s, the Jewish philosopher Maimonides, who lived in the city from about 1160 to 1165, and the traveller Leo Africanus, raised in Fes, whose Description of Africa was for centuries Europe's main source on the continent. A popular story says the future Pope Sylvester II studied here and brought Arabic numerals to Europe; it is a myth.
The courtyard and pavilion of the Qarawiyyin mosque. Image: Ahmed.magdy, CC BY-SA 4.0, via Wikimedia Commons.
The 1554 Venice edition of Leo Africanus's Description of Africa. Image: Ramusio, Giovanni Baptista, Public domain, via Wikimedia Commons.
Where to see it today: non-Muslims cannot enter the Qarawiyyin, but its doors open onto the street, and from several of them you can look into the courtyard. The green roofs are best seen from the rooftop terraces of nearby cafés and shops.
1349: The Library
The Marinid sultan Abu Inan founded the Qarawiyyin Library in 1349. It is one of the oldest working libraries in the world. Its treasures include a 9th-century Quran written in Kufic script on parchment, and a copy of Ibn Khaldun's great history signed by the author himself.
By the early 21st century the building was in a bad state: damp was damaging the manuscripts. In 2012 the Ministry of Culture asked the Moroccan architect Aziza Chaouni to restore it. Her work added a laboratory for the manuscripts, a reading room and an exhibition space, restored the tiles and fountains, and reopened the library in 2016.
The entrance to the Qarawiyyin Library on Place Seffarine. Image: Robert Prazeres, CC BY-SA 4.0, via Wikimedia Commons.
Where to see it today: the library's entrance on Place Seffarine, the coppersmiths' square, where you can still hear the hammering of metalworkers. The rare-manuscript room is not open to the public.
1350–1357: The Madrasas and the Water Clock
The Marinid sultans of the 14th century built a series of madrasas, colleges where students lived and studied, decorated with zellige tilework, carved stucco and cedar. They are among the finest buildings in Morocco, and two of them are open to visitors of all faiths.
The Al-Attarine Madrasa, built in 1323–25 beside the Qarawiyyin, is small and perfect. The larger Bou Inania Madrasa, built for Abu Inan in 1350–55, was also a Friday mosque. Opposite it, in 1357, a timekeeper built the Dar al-Magana, a water clock with 12 windows and 13 carved wooden brackets on the façade. It no longer works, and attempts to repair it have not succeeded, but its façade is still there.
In 2016 and 2017, five other restored madrasas were given back to their original purpose: they now house students of the Qarawiyyin again.
The courtyard of the Bou Inania Madrasa, built in 1350–55. Image: Petar Milošević, CC BY-SA 4.0, via Wikimedia Commons.
The Al-Attarine Madrasa, finished in 1325. Image: Robert Prazeres, CC BY-SA 4.0, via Wikimedia Commons.
The façade of the Dar al-Magana, the water clock of 1357. Image: R Prazeres, CC BY-SA 4.0, via Wikimedia Commons.
Where to see it today: the Bou Inania Madrasa, near Bab Boujloud, and the Al-Attarine Madrasa, next to the Qarawiyyin. Both are open to visitors for a small fee, except at prayer times. At Bou Inania you can enter the courtyard but not the prayer hall. Look up across the street for the Dar al-Magana.
Around 1300: A Hospital That Played Music
In the late 13th or early 14th century the Marinid sultan Abu Yaqub Yusuf founded the Sidi Frej Maristan, a hospital in the heart of the medina. It cared for the sick and the mentally ill, and scholars record that patients were treated with music: musicians came to play Andalusian music for them every week, a practice that continued into the 20th century. The hospital also had a fund to care for sick storks and cranes.
The courtyard of the former Sidi Frej Maristan, now a market. Image: Robert Prazeres, CC BY-SA 4.0, via Wikimedia Commons.
Where to see it today: the site of the maristan, now a courtyard of shops next to the Souk el-Henna, the henna market.
The 15th Century Onwards: The Mellah and the Synagogue
Fes had a large Jewish community from its earliest years. In the 15th century it was moved to a new quarter beside the royal palace, the Mellah, the first of its kind in Morocco. Jewish refugees from Spain arrived after 1492, and the Mellah became a centre of Jewish scholarship and trade.
The Ibn Danan Synagogue, built in the late 17th century by a merchant, Mimon Boussidan, is one of the oldest synagogues in Morocco. By the 1990s it was close to collapse. The World Monuments Fund put it on its watch list in 1996, and with support from American Express, Morocco's Ministry of Culture and a Moroccan Jewish heritage foundation, it was restored and reopened in 1999. During the work a ritual bath was found beneath it.
Inside the Ibn Danan Synagogue, restored in 1996–99. Image: Mx. Granger, CC0, via Wikimedia Commons.
The Jewish cemetery at the edge of the Mellah. Image: Josep Renalias, CC BY-SA 3.0, via Wikimedia Commons.
Where to see it today: the Ibn Danan Synagogue in the Mellah, usually opened by a caretaker for a small tip. Nearby, the Jewish cemetery, with its rows of whitewashed tombs, has a small museum in a former synagogue.
1711 and the 19th Century: The Carpenters' Square
On Place Nejjarine, the carpenters' square, stand two of the medina's loveliest monuments. The Nejjarine Fountain, with its tilework and carved canopy, was built in the 19th century. Beside it, the Funduq al-Nejjarine, an inn for travelling merchants completed in 1711, was restored in the 1990s and opened in 1998 as the Museum of Wooden Arts and Crafts.
The Nejjarine Fountain in an early 20th-century photograph. Image: France coloniale moderne, Public domain, via Wikimedia Commons.
Where to see it today: the Nejjarine museum, Place Nejjarine, open daily, with a rooftop café looking over the medina.
Every Day: Leather and Tiles
Fes is a city of craftsmen, and many still work as their predecessors did. The most famous are the tanners. The Chouara Tannery, by the river, is one of several in the medina, where hides are cured, softened and dyed in stone vats. Tanneries are recorded in Fes from the 12th century, though modern chemical tanning has been used alongside the old methods since the 19th century. Chouara was restored and reopened in 2016.
The city's other great craft is zellige, mosaic made from hand-cut glazed tiles, which covers the walls and fountains of the madrasas and palaces. Fassi embroidery and blue-and-white Fes pottery are still made in the medina, and the red felt fez hat probably takes its name from the city, which was once famous for its crimson dye.
The vats of the Chouara Tannery. Image: Houssain tork, CC BY-SA 4.0, via Wikimedia Commons.
Zellige tilework in the medina. Image: Mike Prince from Bangalore, India, CC BY 2.0, via Wikimedia Commons.
A piece of 19th-century Fes embroidery, now in the Cleveland Museum of Art. Image: , CC0, via Wikimedia Commons.
Where to see it today: the Chouara Tannery, seen from the terraces of the leather shops around it. You'll be given a sprig of mint for the smell. Entry is free, but buy something or leave a tip.
1981 to Today: Saving the Medina
In 1981 UNESCO listed the Medina of Fez as a World Heritage Site. Fes el-Bali, the old medina, is the largest car-free urban area in the world by population, with about 156,000 people living in it.
Keeping it alive has been a long effort. A Moroccan agency for the medina, ADER-Fès, has worked on it since 1989. Between 2013 and 2018 a national programme restored dozens of monuments, including madrasas, fountains, gates and the tanneries. A project funded by the United States restored four old merchants' inns as workshops for craftsmen.
The Bab Boujloud gate, with its blue tiles outside and green tiles inside, is younger than it looks: the French administration built it in 1913. It is the main entrance to the old city.
Bab Boujloud, the main gate of the medina, built in 1913. Image: Petar Milošević, CC BY-SA 4.0, via Wikimedia Commons.
Where to see it today: enter the medina through Bab Boujloud. The Al Batha Museum, in a 19th-century palace with an Andalusian garden, reopened in 2025 after restoration as a museum of Islamic arts.
The courtyard of the Batha palace, now the Al Batha Museum of Islamic Arts. Image: R Prazeres, CC BY-SA 4.0, via Wikimedia Commons.
Every June: Sacred Music
In 1994 the Sufi scholar Faouzi Skali founded the Fes Festival of World Sacred Music, bringing together musicians of different faiths and traditions from around the world. It has been held almost every year since, with concerts at the Bab Makina, a vast courtyard of the royal palace.
The Bab Makina, the palace courtyard where the Festival of World Sacred Music holds its concerts. Image: Robert Prazeres, CC BY-SA 4.0, via Wikimedia Commons.
Where to see it today: be in Fes in June, when the festival is held.
How to See Bright Fes
A self-guided walk, about 3 km, downhill. Enter at Bab Boujloud and visit the Bou Inania Madrasa and the water clock opposite. Walk down the Talaa Kebira to Place Nejjarine and its museum, then to the doors of the Qarawiyyin and the Al-Attarine Madrasa. Continue to Place Seffarine for the library, then follow the noise and the smell to the Chouara Tannery. Cross the river to the gate of the Andalusian Mosque. A local guide helps in the maze, and an official one carries a badge.
Further afield:
- The Mellah, the Ibn Danan Synagogue and the Jewish cemetery, in Fes el-Jdid.
- The Al Batha Museum.
- The Marinid Tombs on the hill north of the medina, at sunset, when the call to prayer rises from hundreds of mosques at once.
The ruined Marinid Tombs above the medina. Image: Mx. Granger, CC0, via Wikimedia Commons.
Dates to know:
- June: the Fes Festival of World Sacred Music.
- The medina is busiest around the Islamic holidays, whose dates move each year.