Fes is often called Morocco’s spiritual or cultural capital, but those labels become meaningful only when you see how the city was built. Fes el-Bali began as two communities on opposite banks of a river. Later rulers joined them, expanded their walls and founded a second royal city. Scholars gathered around Qarawiyyin, Marinid patrons built madrasas, Jewish families shaped the Mellah, and colonial planning added a Ville Nouvelle beyond the old walls.

The result is not one “ancient medina.” It is an urban archive whose layers still function as neighborhoods, markets, religious institutions and workshops.

This guide tells the history of Fes through places a visitor can read on the ground. It does not replace our practical Fes trip-planning guide or the step-by-step Fes medina walking route.

Fes History at a Glance

  • Late 8th to early 9th century: The Idrisids establish the first urban nuclei along the Fes River.
  • 9th century: The Qarawiyyin and Andalusian mosque communities take shape on opposite banks.
  • 11th century: Almoravid rule unites the two early towns within one defensive system.
  • 12th–13th centuries: Almohad rebuilding helps give Fes el-Bali its broad medieval extent.
  • 13th–15th centuries: The Marinids make Fes a capital, establish Fes Jdid and sponsor major madrasas.
  • 15th century onward: The Mellah develops beside the royal city, becoming a major center of Jewish life.
  • 16th–19th centuries: Saadian and Alaouite rulers alternately favor and reinvest in Fes.
  • 1912: The political capital moves to Rabat under the French Protectorate; a European-planned new city grows outside the medina.
  • 1981: The Medina of Fez is inscribed on the UNESCO World Heritage List.

Dates simplify a complicated story. Dynasties overlapped with local authority, buildings were repeatedly repaired, and traditions sometimes preserve a clearer cultural memory than surviving documents. Treat the timeline as a structure for looking, not a claim that the city changed overnight with every ruler.

Before Fes: Why This Valley?

The city grew in the Saiss plain near routes connecting Morocco’s Atlantic regions, the Middle Atlas, the Mediterranean north and the wider Maghreb. Water mattered. The Fes River and its channels supported households, gardens, baths, mills and water-intensive crafts.

That water system also shaped the steep, branching medina. Main routes tend to descend toward the historic commercial and religious core, while smaller lanes climb toward residential quarters and gates. The topography visitors experience today is part of the city’s economic history, not an accidental maze.

The surrounding agricultural land supplied grain, olives, fruit and livestock. Fes could become a major urban center because it was connected to a productive region as well as to long-distance scholarship and trade.

The Idrisid Foundations

UNESCO’s history of the Medina of Fez places the foundation of the Idrisid capital between 789 and 808. The first city was not a single unified medina. Two fortified communities developed on opposite banks of the river: one associated with migrants from al-Andalus and the other with people connected to Kairouan in present-day Tunisia.

This two-bank origin survives in the names and identities of the Andalusian and Qarawiyyin sides. It also explains why Fes developed more than one religious and neighborhood center.

Idris I established the first settlement at the end of the eighth century; Idris II expanded Fes and made it a political center in the early ninth. The Idrisid dynasty occupies a foundational place in Moroccan history because it created an early Islamic state with deep local roots. The Moroccan National Tourist Office’s dynastic overview connects the Idrisids directly with Fes becoming a capital.

Few buildings survive exactly as they stood in the ninth century. Mosques, gates and houses were enlarged or rebuilt over centuries. The historical layer is therefore visible through urban continuity and institutional memory more than untouched masonry.

Qarawiyyin and the Making of a Scholarly City

The Qarawiyyin Mosque was founded in the ninth century and expanded under later dynasties. Tradition attributes its foundation to Fatima al-Fihri, a woman from a family associated with Kairouan. Over time, teaching around the mosque developed into one of the Islamic world’s important centers of religious and intellectual learning.

Popular travel writing often calls Qarawiyyin “the world’s oldest university.” That phrase needs context. The institution began as a mosque, teaching evolved across centuries, and the modern category of university does not map neatly onto a ninth-century religious foundation. It is more accurate to describe Qarawiyyin as one of the world’s oldest continuously operating centers of learning, with a later formal university structure.

For most non-Muslim visitors, the mosque interior is not open for ordinary sightseeing. A respectful glimpse through an open doorway can reveal part of the courtyard, but do not block worshippers or push past a boundary.

The importance of Qarawiyyin is larger than one building. Book production, legal scholarship, teaching, lodging and charitable endowments supported an intellectual district around it. The lanes near the mosque became a center of urban gravity.

Almoravids: Joining the Two Banks

By the eleventh century, the early communities had grown. Under the Almoravids, the dividing defenses were removed and the two sides were brought inside a unified wall. This was a decisive urban act: separate settlements became one city while retaining neighborhood identities.

Almoravid patrons also enlarged Qarawiyyin. The period tied Fes more closely to an empire stretching across Morocco and into al-Andalus. Architectural knowledge, legal traditions, objects and people moved across the Strait of Gibraltar and Saharan trade networks.

Visitors rarely identify an entire street as “Almoravid.” It is easier to understand the legacy in the connected medina itself—the fact that the two sides operate as one urban fabric.

Almohads: Walls, Gates and Urban Scale

The Almohads replaced the Almoravids in the twelfth century. Conflict damaged parts of Fes, but rebuilding followed. UNESCO notes that Fes el-Bali had broadly reached its present size under Almohad rule in the twelfth and thirteenth centuries.

The walls and gates did more than defend the city. Gates controlled movement, taxation and the transition between countryside and urban markets. Routes from the gates descended toward mosques and commercial areas, while cemeteries and defensive heights occupied land outside the dense residential core.

Archnet’s study of Bab Guissa describes how the gate’s angled form and upper level served defensive needs, while also tracing rebuilding across Almoravid, Almohad and Marinid periods. That layered history is typical of Fes: a gate may carry the decisions of several dynasties rather than one clean date.

The Marinid Golden Age

Fes reached a political and architectural high point under the Marinids in the thirteenth and fourteenth centuries. UNESCO describes this as the period when Fes replaced Marrakech as capital and when many of the medina’s major madrasas, fondouks, residences, fountains and palaces took shape.

The Marinids did not simply decorate Fes el-Bali. In 1276, they founded Fes Jdid, the “new Fes,” west of the old city. It held the royal palace, military and administrative functions, fortifications and residential quarters. Creating a separate royal city allowed the dynasty to govern beside the old scholarly and commercial center without trying to insert an entire palace complex into its dense lanes.

This produced the urban structure visitors still encounter:

  • Fes el-Bali: the older commercial, religious and craft city;
  • Fes Jdid: the Marinid royal and administrative city;
  • the Mellah: the historic Jewish quarter beside the palace;
  • the Ville Nouvelle: the twentieth-century planned city farther southwest.

Understanding those parts prevents the common mistake of calling everything inside Fes “the medina.”

Why the Marinids Built Madrasas

Madrasas provided lodging and instruction for students, often near a major mosque. Marinid rulers sponsored them as acts of piety, scholarship and political legitimacy. Their compact courtyards also became some of the period’s finest architectural statements.

Visitor studying zellige, carved stucco and cedar in a Marinid-style Fes madrasa courtyard

Bou Inania and Al Attarine are the two best-known examples for visitors. Their surfaces organize materials vertically:

  1. durable zellige tile at the lower level;
  2. carved plaster above it;
  3. cedar wood framing upper zones;
  4. calligraphy and geometric or vegetal patterns tying the composition together.

Decoration was not merely luxury. It turned proportion, text, mathematics, craft and controlled light into a setting for study and devotion.

Openings, restoration work and ticket conditions can change. Check locally rather than assuming every madrasa is accessible on the same day. When a religious function remains active, follow site instructions and dress respectfully.

Fondouks and the Commercial City

A fondouk—also written funduq—was a building where merchants could lodge, store goods and conduct trade around an internal courtyard. These structures linked neighborhood markets with long-distance commerce.

Their architecture is practical: a large entrance for goods, storage and workspaces below, and rooms or galleries above. Some restored fondouks now house museums or cultural spaces; others remain tied to workshops and commerce.

The Nejjarine fondouk, associated today with a museum of wooden arts and crafts, helps visitors read this building type. Its location near a fountain and specialist lanes also demonstrates how water, trade and craft clustered inside the medina.

Rather than imagining medieval Fes only as mosques and palaces, picture a city of deliveries, pack animals, dye, timber, food, contracts, rented rooms and skilled labor.

Craft Quarters as Urban Memory

Fes is known for leather, metal, wood, weaving and ceramics because craft knowledge remained embedded in its urban economy. Historically, related trades clustered by lane or district. Shared water, furnaces, raw materials, guild relationships and market access made concentration practical.

The Chouara tanneries are the most photographed example, but their history should not be reduced to colorful vats. Tanning is demanding work involving hides, water, cleaning, treatment, dye and drying. Viewing terraces are generally reached through leather shops; clarify whether a visit or explanation carries an expectation before following someone upstairs.

The Moroccan National Tourist Office’s Fes medina guide emphasizes that craftsmen and monumental architecture remain part of the living old city. “Living” is the important word. Workshops change tools, products respond to markets, and residents need modern services even inside protected fabric.

Fes Jdid: The Royal City

Fes Jdid is newer only in relation to Fes el-Bali; it is itself a thirteenth-century city. Its broad approaches, walls and royal presence create a different scale from the intimate old medina.

The Royal Palace is not open as an ordinary visitor attraction. Its famous gates can be viewed from the public square, but the decorative entrance should not distract from the district around it. Walls, administrative space and military organization reveal why the Marinids created a separate capital quarter.

Fes Jdid also connects the palace zone to the Mellah. Walking here makes the political geography visible: royal authority, protected communities, commerce and ceremonial routes occupied adjacent but distinct spaces.

The Mellah and Jewish Fes

The Mellah of Fes became Morocco’s first district widely known by that name. Jewish communities had lived in and around Fes before its establishment beside the royal city; moving and concentrating the community there was part of a changing relationship with royal protection, administration and urban control.

The district’s architecture differs in visible ways from much of Fes el-Bali. Upper floors with outward-facing windows and wooden balconies appear along some streets, while the old medina’s homes more often emphasize privacy around internal courtyards.

Synagogues, cemeteries and family histories preserve the memory of a community that played major roles in commerce, craft, scholarship and cultural life. Much of Morocco’s Jewish population emigrated in the twentieth century, especially after the creation of Israel and amid broader political and economic changes. Heritage sites should be approached as evidence of lived Moroccan history, not as an exotic footnote.

Opening arrangements can be informal or variable. Ask permission, dress respectfully and contribute when a caretaker maintains a site.

Saadians, Alaouites and Shifting Capitals

After Marinid power declined, Fes remained politically important even when rulers favored Marrakech, Meknes or other centers. Saadian defenses above the city and later Alaouite interventions show that control of Fes still mattered.

The Saadian borjs on the hills around the medina are often remembered today as viewpoints. Historically, their position also expressed power over the city. A panorama from the north makes the old urban geography legible: dense Fes el-Bali below, walls along the slopes, and the wider plain beyond.

Under the Alaouites, Fes sometimes served again as a capital and always remained an important scholarly and commercial center. Royal patronage repaired institutions and connected the city to the dynasty that continues to rule Morocco today.

Fes history is therefore not a simple rise and fall. Political primacy moved, but religious learning, craft and urban prestige gave the city continuity.

1912 and the Ville Nouvelle

In 1912, the Treaty of Fes established the French Protectorate, and the seat of political administration moved to Rabat. Colonial planners developed a new European-style city outside the historic medina rather than replacing its street fabric.

Wide avenues, administrative buildings, apartment blocks and rail-oriented growth formed the Ville Nouvelle. This spatial separation reflected colonial ideas about governance, hygiene, traffic and social order. It also created inequalities and new patterns of movement that continued after independence.

Modern Fes cannot be understood by staying only inside the walls. Residents cross between the old medina, Fes Jdid and the Ville Nouvelle for work, education, shopping and family life. The city is not divided into “authentic” and “ordinary” halves; each layer belongs to its history.

Independence, Conservation and UNESCO

Morocco regained independence in 1956. Fes continued growing far beyond its historic core, while the medina faced pressure from aging buildings, population change, infrastructure needs and the movement of some families toward newer districts.

UNESCO inscribed the Medina of Fez as a World Heritage property in 1981. The designation recognizes not only monuments but also the urban fabric, traditional land use, architecture and cultural practices developed over centuries.

World Heritage status does not place the city under glass. Conservation must balance structural safety, sanitation, housing, tourism, workshops and the authenticity of materials and skills. UNESCO’s site assessment identifies deterioration and development pressure among the challenges while emphasizing the survival of traditional building knowledge.

Visitors participate in that balance. Staying in a restored house can support conservation, but excessive conversion of homes into tourist accommodation can also change neighborhoods. Buying craft can sustain skill, but demand for cheap souvenirs can reward shortcuts. “Preservation” is a social question as well as an architectural one.

How to Read Fes While You Walk

History becomes easier when you look for evidence instead of dates.

Follow the Slope

Routes descending toward Qarawiyyin reveal the old city’s center of gravity. Water, markets and worship pulled movement inward and downward.

Notice Blank Exteriors

Many traditional homes reveal little from the lane. Wealth and decoration turn toward an internal courtyard, supporting privacy and climate control. A plain wall does not indicate a poor interior.

Compare Gate Functions

Bab Boujloud is now the most familiar visitor entrance, while other gates preserve clearer defensive logic. Look at bends, side chambers, wall thickness and the relationship to roads outside.

Identify Building Types

A madrasa, fondouk, hammam, fountain and riad may share decorative materials but served different urban needs. Naming the building type gives decoration a purpose.

Listen for Work

Hammering, weaving and delivery calls are historical continuity in motion. Ask before entering or photographing a workshop.

A Two-Day History-Focused Plan

This plan complements, rather than repeats, the detailed medina route.

Day One: Fes el-Bali

Begin at a high viewpoint or near Bab Boujloud to understand the valley. Walk toward a Marinid madrasa, then continue into the Qarawiyyin quarter. Include one fondouk or craft museum and one workshop area. End before fatigue turns every lane into visual noise.

A licensed guide can help connect places with dynasties, but agree on the duration, fee and shopping expectations in advance. Ask questions about building function and restoration, not only legends.

Day Two: Fes Jdid and the Modern Layer

Start around the Royal Palace exterior and walk through the Mellah with attention to balconies, synagogues and the cemetery where accessible. Continue along the walls or use a taxi to a northern viewpoint.

Spend late afternoon in the Ville Nouvelle. The contrast in street width, façades and public space makes the twentieth-century change immediately visible. Returning to Fes el-Bali afterward will feel different because you can place it inside a larger city.

Historical Claims to Treat Carefully

“The medina has never changed.” It has changed constantly through repair, rebuilding, new infrastructure and shifting residents. Continuity does not mean immobility.

“Qarawiyyin has always been a modern university.” It began as a mosque and center of learning; institutional form evolved over centuries.

“Every craft process is medieval.” Skills may be old, while tools, chemicals, designs and markets change.

“Fes el-Bali is the whole city.” Fes Jdid, the Mellah, the Ville Nouvelle and modern suburbs are essential layers.

“One dynasty built each monument.” Major buildings often contain several periods of expansion and restoration.

Careful language makes the city more interesting, not less romantic.

Practical Advice for a History Visit

  • Stay at least two nights; three allows slower observation.
  • Use our Fes first-trip guide for stations, neighborhoods and accommodation.
  • Save your lodging pin and address offline.
  • Wear shoes suitable for steep, polished and uneven surfaces.
  • Confirm monument opening hours locally, especially on Fridays and religious holidays.
  • Do not enter mosques unless access is explicitly permitted.
  • Ask before photographing people, worship or work.
  • Use the Bab Boujloud-to-R’cif walking route when you want precise navigation.
  • Leave time to sit in a courtyard or café; history is harder to absorb when rushed.

Final Perspective

Fes matters because its past remains spatial. The Idrisid banks survive inside the identity of Fes el-Bali. Almoravid unification lives in the connected medina. Marinid ambition appears in Fes Jdid and its madrasas. The Mellah records centuries of Jewish Moroccan life. The Ville Nouvelle reveals colonial separation and modern growth.

No single doorway explains all of that. The city becomes legible through comparison: old bank and new royal quarter, inward courtyard and outward balcony, defensive gate and planned avenue, inherited skill and contemporary work.

Walk Fes as a living archive rather than a medieval fantasy, and its history stops being background information. It becomes the structure of the journey.