Fes, often described as the spiritual and intellectual heart of Morocco, is a city where time weaves centuries of history into its streets, traditions, and daily life. Founded in the year 789 by Idris I, the city’s origins are deeply tied to the Idrisid dynasty, also known as the Adarissa. Idris I laid the foundations of a settlement that his son, Idris II, would expand into a thriving capital, marking the beginning of Fes as both a political and cultural center of Morocco.

Early Foundations and the Idrisid Era
The arrival of Idris I marked a turning point in Moroccan history. Establishing Fes in 789, he envisioned a stronghold of faith and authority. His son, Idris II, transformed this vision into reality by expanding the city, welcoming migrants from Andalusia and Kairouan (region in Tunisia ) . These waves of newcomers gave Fes a unique demographic identity early on, blending Arab, Amazigh, and Andalusian influences. This diverse composition would remain one of the defining characteristics of the city throughout the centuries.
Historical Demography of Fes
From its beginnings, Fes has been a city of migration and mixture. In the 9th and 10th centuries, the population was enriched by waves of Andalusians fleeing the Iberian Peninsula, and by communities from Ifriqiya (western Libya, Tunisia, and eastern Algeria). By the medieval period, it had grown into one of the largest urban centers of North Africa, with tens of thousands of inhabitants. Over time, Fes became a dense, multiethnic metropolis, hosting Arabs, Amazigh, Jews, and other Mediterranean communities, all contributing to its economic and cultural vibrancy. Among the defining achievements of this period was the foundation of Al-Qarawiyyin University in 859, established by Fatima al-Fihri. Originally built as a mosque, it soon developed into a center of scholarship and is recognized today as the oldest continuously operating university in the world, reinforcing the city’s role as a cradle of knowledge.

Successive Dynasties and Their Legacy
Idrisids (8th–10th centuries): Founded the city and gave it its religious and political identity, making Fes the first real capital of Morocco.
Almoravids (11th–12th centuries): Unified the two early settlements of Fes into a single city, strengthening its urban structure and trade connections.
Almohads (12th–13th centuries): Integrated Fes into their vast empire, further consolidating its role as a spiritual and cultural hub.
Marinids (13th–15th centuries): Marked a golden age for Fes. They founded Fes el-Jdid (“New Fes”), built monumental gates, madrasas, and mosques, and supported scholarship, solidifying the city’s reputation as a center of knowledge.
Wattasids (15th–16th centuries): A period of political challenges but continuity of the intellectual traditions established earlier.
Saadians (16th–17th centuries): Shifted political power toward Marrakesh, yet Fes remained a cultural stronghold.
Alaouites (17th century to present): Preserved the historical and religious role of Fes, investing in its restoration and safeguarding its legacy while modern Morocco developed new political capitals.

A City of Continuity
Each dynasty left its imprint on the city’s identity. From the Idrisids who laid its foundations, to the Marinids who made it a beacon of scholarship, and the Alaouites who preserved its heritage, Fes has always been more than a capital, it has been a mirror of Moroccan civilization.

Today, while political power resides elsewhere, Fes continues to embody its historic role. Its streets, institutions, and traditions still reflect the layered story of Morocco itself, making it not only a place of memory but a living narrative of cultural continuity.
