Cities And Settlements Codexery

Fez, Morocco

Ancient Moroccan city, historic capital and center of learning.

Fez, Morocco

Fez (or Fes) is a city in northern inland Morocco and the capital of the Fez-Meknes administrative region. It is one of the largest cities in Morocco, with a population of 1.256 million according to the 2024 census. Located to the northwest of the Atlas Mountains, it is surrounded by hills and the old city is centered around the Fez River (Oued Fes) flowing from west to east. Founded under Idrisid rule during the 8th century CE, Fez initially consisted of two autonomous and competing settlements. Successive waves of mainly Arab immigrants from Ifriqiya (Tunisia) and al-Andalus (Spain/Portugal) in the early 9th century gave the nascent city its Arab character. After the downfall of the Idrisid dynasty, other empires came and went until the 11th century when the Almoravid Sultan Yusuf ibn Tashfin united the two settlements into what is today's Fes el-Bali (lit. 'Old Fez') quarter, also known as the Medina of Fez.

Population (2024 census)
1.256 million

Lore & Background

Fez was first founded in 789 as Madinat Fas on the southeast bank of the Jawhar River (now the Fez River) by Idris I, a Hasanid Sharif from Arabia who was forced to flee the Hejaz after a failed revolt against the Abbasid Caliphate. His son, Idris II, built a settlement called al-ʿĀliyá on the opposing river bank in 809 and moved his capital here from Walili (Volubilis). The early population was composed mostly of Berbers, along with hundreds of Arab warriors from Kairouan who made up Idris II's entourage. Arab immigration increased afterwards: Andalusi families of mixed Arab and Iberian descent, expelled from Córdoba after a rebellion in 817–818 against al-Hakam I, settled mainly in Madinat Fas, while immigrants from Kairouan and al-Andalus gave the city its Arabic character and their names to the districts of 'Adwat Al-Andalus and 'Adwat al-Qarawiyyin. The city also had a prominent Jewish community, probably consisting of Zenata Berbers who had previously converted to Judaism, concentrated in a northeastern district of al-ʿĀliyá known as Funduq el-Yihoudi. In the 10th century, Fez was contested by the Umayyad Caliphate of Córdoba and the Fatimid Caliphate of Ifriqiya, who ruled through Zenata clients. The Fatimids took the city in 927 and expelled the Idrisids definitively. From 980 (or 986), Fez was ruled by a Zenata dynasty from the Maghrawa tribe, allies of the Caliphate of Córdoba. Under Zenata control, Fez continued to grow despite conflicts between its two settlements. Dunas ibn Hamama, ruling between 1037 and 1049, developed much of Fez's water supply system, which has largely survived up to the present day, and built hammams, mosques, and the first bridges over the Oued Bou Khrareb. Between 1059 and 1061, the two cities were ruled separately by two rival Zenata emirs: al-ʿĀliyá by Al-Gisa and Madinat Fas by Al-Fetouh, whose names are preserved in the gates Bab Guissa and Bab Ftouh. In 1069–1070, Fez was conquered by the Almoravids under Yusuf ibn Tashfin, who unified Madinat Fas and al-ʿĀliyá into one city, destroying the dividing walls and building a new circuit of walls. A kasbah was built at the western edge of the city. Under Almoravid rule, Fez gained a reputation for Maliki legal scholarship and remained an important centre of trade and industry. In 1145, the Almohad leader Abd al-Mu'min besieged and conquered the city, demolishing its fortifications due to fierce resistance, but the Almohad caliph Ya'qub al-Mansur ordered reconstruction of the ramparts, completed by Muhammad al-Nasir in 1204, establishing the perimeter of Fes el-Bali to this day. During the 12th century, the city was one of the largest in the world. Fez reached its zenith in the Marinid era (13th–15th centuries), regaining its status as political capital. Numerous new madrasas and mosques were constructed, many surviving today, counted among the hallmarks of Moorish and Moroccan architectural styles. In 1276, the Marinid sultan Abu Yusuf Yaqub founded the royal administrative district of Fes Jdid (lit. 'New Fez'), where the Royal Palace (Dar al-Makhzen) is still located today, with extensive gardens added later. During this period the Jewish population grew and the Mellah (Jewish quarter) was formed on the south side of this new district. After the overthrow of the Marinid dynasty, Fez's growth stalled and it competed with Marrakesh for political and cultural influence. It became the capital again under the 'Alawi dynasty up until 1912. The city now consists of two old medina quarters, Fes el-Bali and Fes Jdid, and the much larger modern urban Ville Nouvelle area founded during the French colonial era.

Reader's Guide

Fez holds immense significance as a living historical city that preserves over a millennium of Moroccan and Islamic heritage. Its medina, Fes el-Bali, is listed as a World Heritage Site and is one of the world's largest and oldest urban pedestrian zones (car-free areas). It contains the University of al-Qarawiyyin, founded in 857, which is the oldest continuously functioning institute of higher education in the world. It also contains the Chouara Tannery from the 11th century, one of the oldest tanneries in the world. The city's architecture from the Marinid period includes numerous madrasas and mosques that are hallmarks of Moorish and Moroccan styles. Fez's role as a political capital under the Idrisid, Marinid, and 'Alawi dynasties underscores its enduring importance in Moroccan history. The city's two historic medinas—Fes el-Bali (Old Fez) and Fes Jdid (New Fez, founded 1276)—along with the Mellah (Jewish quarter), reflect its multicultural past. The water supply system developed in the 11th century under Zenata ruler Dunas ibn Hamama largely survives today.

Did You Know?

Founding & the Two Rival Cities

Fez traces its origins to 789 CE, when Idris I—a Hasanid Sharif who had fled the Hejaz after a failed uprising against the Abbasid Caliphate—established Madinat Fas on the southeast bank of the Jawhar River, today known as the Fez River. His son Idris II followed in 809, founding al-ʿĀliyá on the opposite bank and shifting the capital from Volubilis. For nearly two centuries these two settlements existed as separate, competing entities; no Idrisid coin bears the name "Fez," only al-ʿĀliyá. The early population was predominantly Berber, supplemented by Arab warriors from Kairouan who formed Idris II's entourage. A wave of Andalusi families, expelled from Córdoba after the 817–818 rebellion against al-Hakam I, settled mainly in Madinat Fas and lent the city its enduring Arabic character. A significant Jewish community, likely of Zenata Berber origin, clustered in a northeastern district of al-ʿĀliyá. It was not until 1070, under Almoravid Sultan Yusuf ibn Tashfin, that the two settlements were formally united into what we now call Fes el-Bali.

The Marinid Golden Age

The 13th through 15th centuries marked Fez's most radiant period. Under the Marinid dynasty the city reclaimed its role as political capital and became a magnet for religious scholarship and mercantile enterprise. Sultans commissioned an extraordinary wave of construction: new madrasas and mosques rose across the urban fabric, and existing structures received careful restoration. Many of these buildings remain standing today and are widely regarded as defining examples of Moorish and Moroccan architectural vocabulary. In 1276, Sultan Abu Yusuf Yaqub established Fes Jdid, a royal administrative district on the north side of the river, to house the Dar al-Makhzen (Royal Palace), which still anchors the area. Extensive gardens were later added to the palace grounds. The Jewish population expanded during this era, and a dedicated quarter—the Mellah—took shape on the southern edge of the new district. After the Marinids were overthrown, Fez's growth stagnated and it entered a long rivalry with Marrakesh for cultural and political primacy, a position it would not fully recover until the 'Alawi dynasty made it capital once more, a role it held until 1912.

The Medina as Living Heritage

Today Fez is home to one of the world's largest and oldest car-free urban zones: the Medina, a World Heritage Site that preserves the layered history of two distinct old quarters—Fes el-Bali and Fes Jdid—alongside the far larger Ville Nouvelle, a modern district laid out during the French colonial period. The Medina's most celebrated institution is the University of al-Qarawiyyin, founded in 857 and recognized as the oldest continuously operating institute of higher education on Earth. Equally remarkable is the Chouara Tannery, an 11th-century leather-working complex that remains one of the oldest tanneries still in existence. The city sits in northern inland Morocco, northwest of the Atlas Mountains, ringed by hills, with the Fez River (Oued Fes) threading west to east through its heart. According to the 2024 census, the metropolitan population stands at roughly 1.256 million, making it one of Morocco's largest cities and the capital of the Fez-Meknes administrative region.

The Name and Its Legends

The city's Arabic name, Fās (written ڢاس in traditional Maghrebi script), has spawned a rich tapestry of etymological legends. One popular story holds that a gold pickaxe was unearthed during the original construction, linking the name to the Arabic word faʾs, meaning "pickaxe." Another tradition credits Idris I himself with using a silver-and-gold pickaxe to dig alongside his laborers. The historian Ibn Abi Zar offers a different explanation: an older settlement called "Sef" once occupied the site, and Idris I simply reversed its letters to coin "Fes." A linguistic hypothesis connects the name to the Zenati term "afas," meaning "ruins," suggesting the city was built atop the remains of a predecessor. Yet another theory points to "Fazaz," the name of a nearby region, or to the Arabic faẖs, meaning "wide plain." During the Idrisid period (788–974), the name Fās was actually reserved for Idris I's original settlement, while the capital on the opposite riverbank carried the name al-ʿĀliyá. Only after the 1070 unification did Fās become the single name for the combined city.

Frequently Asked Questions

Who is Fez, Morocco?

Fez is an ancient inland city in northern Morocco that serves as the capital of the Fez-Meknes administrative region. It was established in the 8th century CE under Idrisid rulers and has since functioned as a major political and cultural hub for the country.

What are Fez, Morocco's powers and role?

Fez holds the distinction of housing al-Qarawiyyin, the oldest continuously operating university in the world, established in 857. Its historic medina and quarters are recognized as a UNESCO World Heritage Site, and the city long served as a center of religious scholarship and mercantile trade.

How does Fez, Morocco's story end?

Fez's narrative is still unfolding, as the city remains an active settlement with a 2024 census population of roughly 1.256 million people. Although it no longer holds the title of national capital, it continues to thrive as a cultural and academic center in modern Morocco.

Why is Fez, Morocco important?

Fez is significant because it regained its status as political capital during the Marinid era and became a renowned center for Islamic learning and commerce. Its two original autonomous communities, unified in the 11th century under Almoravid rule, created a layered urban fabric that still defines the city today.

How was Fez, Morocco founded?

The city was established in the 8th century CE under Idrisid rule, initially as two separate autonomous settlements. These were later merged into a single entity during the 11th century when Almoravid leaders brought them together under unified governance.

More in Cities And Settlements 1-17

Spotted an error? Know more?

This is a living reference — every entry is fact-audited, and reader corrections feed straight into our audit queue. Suggest an edit · See this site's audit record

Comments

Loading…
Open in the interactive codex →