Skip to main content
Marrakech City Guide guide coverCity guide

Morocco

Marrakech City Guide

Direct Answer: Founded by the Almoravids around 1062 CE at the foot of the High Atlas, Marrakech is the Red City that gave Morocco its name — a caravan capital whose rose-ochre ramparts, Koutoubia ...

17 min readReviewed 2026-09-18
Start exploring

Direct Answer: Founded by the Almoravids around 1062 CE at the foot of the High Atlas, Marrakech is the Red City that gave Morocco its name — a caravan capital whose rose-ochre ramparts, Koutoubia minaret, and Jemaa el-Fnaa square anchor a UNESCO-listed medina.

Share this with others

Overview & Key Takeaways

Marrakech (Arabic: مراكش, Murrākush; Berber: ⵎⵕⵕⴰⴽⵛ, Meṛṛakec), celebrated historically as the "Red City" (al-Madīnah al-Ḥamrāʾ), is one of Morocco’s four historic Imperial Cities and the capital of the Marrakesh-Safi region [1], [20]. Founded in the mid-11th century (c. 1062–1072 CE) by the Sanhaja Berber leader Yusuf ibn Tashfin of the Almoravid dynasty, Marrakech transformed from a nomadic camp and trans-Saharan trading post into the imperial metropolis that gave the Kingdom of Morocco its historical and international name [1], [3], [7].

Across nearly a millennium, Marrakech served as the seat of three major ruling houses—the Almoravids, the Almohads, and the Saadians—while remaining an indispensable imperial, commercial, and spiritual capital under the ruling Alaouite monarchy [1], [13], [18], [21]. In 1985, the historic Medina of Marrakech was inscribed on the UNESCO World Heritage List in recognition of its extraordinary architectural heritage, spanning monumental ramparts, palatial ruins, sacred madrasas, and the legendary public cultural space of Jemaa el-Fnaa [1], [12], [25].

Key Takeaways for Researchers and Travelers

  • Almoravid Foundation (1062–1072 CE): Established by Yusuf ibn Tashfin as the political and spiritual capital of an empire extending from the Senegal River to the Iberian Peninsula (Al-Andalus) [1], [4], [7].
  • The Etymology of Morocco: The modern European name "Morocco" directly derives from the Portuguese, Spanish, and Latin corruptions of "Marrakech" (Marrocos / Marruecos) [3].
  • Almohad Transformation (1147–1269 CE): Conquered by the Masmuda Berber reform movement originating in the High Atlas sanctuary of Tinmel, who reconstructed the city into an intellectual and architectural powerhouse anchored by the monumental Koutoubia Mosque [5], [23], [26].
  • Dual-Capital Dynamic with Fez: Under the 13th–14th century Marinid dynasty, political hegemony shifted northward to Fez, creating Morocco's enduring geopolitical balance between northern and southern capitals [6], [22].
  • Saadian Golden Age (16th Century): Restored to imperial capital status by the first Arab Sharifian dynasty, reaching unprecedented architectural splendor under Sultan Ahmad al-Mansur through the construction of the El Badi Palace and the Saadian Tombs [2], [13], [17].
  • UNESCO World Heritage Inscription (1985): Designated under UNESCO Criteria (i), (ii), (iv), and (v) for its dense assemblage of Almoravid fortifications (built 1126–1127 CE), Almohad gates, Saadian monuments, and thriving craft guilds [1], [22], [25].

Fast Facts For Travelers

Metric / Dimension Detail & Historical Record Citations
City Name Marrakech (Murrākush, al-Madīnah al-Ḥamrāʾ / "The Red City") [1], [3]
Geographic Region Haouz Plain, foothills of the High Atlas Mountains, Central-Southern Morocco [1], [5]
Foundation Date 1062–1072 CE (Almoravid dynasty under Abu Bakr ibn Umar and Yusuf ibn Tashfin) [1], [4], [7]
Founding Dynasty Almoravids (al-Murābiṭūn, Sanhaja Amazigh confederation) [1], [7]
Imperial Dynasties Based in Marrakech Almoravid Empire (1062–1147), Almohad Caliphate (1147–1269), Saadi Sultanate (1554–1659) [1], [2], [10], [21]
Status in Moroccan Monarchy One of Morocco’s Four Imperial Cities (alongside Fez, Meknes, and Rabat) [6], [20], [24]
Current Ruling Dynasty Alaouite Dynasty (al-ʿAlawiyyūn, reigning since the 17th century) [10], [13], [18]
UNESCO Inscription Date 1985 (Cultural World Heritage Site #331, 1:10,000 mapping boundary) [1], [8], [25]
Historic City Walls (Ramparts) Built 1126–1127 CE by Ali ben Yusuf (approx. 19 km of pisé / rammed earth) [22]
Principal Landmarks Koutoubia Mosque, Jemaa el-Fnaa, Ben Youssef Madrasa, Saadian Tombs, El Badi Palace, Bahia Palace, Menara & Agdal Gardens [1], [13], [21]

Geographical Setting & Geopolitical Strategy

Marrakech is situated on the expansive, semi-arid Haouz Plain at an elevation of approximately 450 meters above sea level, framed immediately to the south by the snow-capped barrier of the High Atlas Mountains [1], [5], [15].

Geographical & Strategic Axis of Marrakech N Northern Morocco & Al-Andalus Fez, Meknes, Rabat, Tangier, Spain Caravan Routes & Royal Highways Marrakech (Haouz Plain) Water Table & Oued Tensift Khettara Subterranean Canals Palm Grove (Palmeraie) Tizi n'Tichka & Tizi n'Test Passes High Atlas Mountains (Tinmel) Trans-Saharan Trade Corridor Souss Valley, Draa Valley, Sijilmassa, Timbuktu, Gold & Salt Routes

Strategic Geography of the Haouz Plain

  1. Gateway to the Sahara and the High Atlas: Marrakech was engineered at the terminus of major trans-Atlas mountain passes—most notably the Tizi n'Test pass (connecting to the Souss Valley and Sub-Saharan trade) and the Tizi n'Tichka pass (connecting to the Draa and Tafilalt oases) [5], [7], [23].
  2. Water Engineering (Khettaras): Lacking a major perennial river through its center, Marrakech prospered through revolutionary subterranean irrigation networks called khettaras (gravity-fed qanat systems) designed during the Almoravid period to funnel mountain runoff from the High Atlas directly into agricultural orchards, public fountains, and palatial gardens [1], [15].
  3. The Palmeraie (Palm Grove): The introduction of controlled irrigation created an artificial 13,000-hectare date palm oasis that provided cooling microclimates, timber, and food security [1], [15].

The Dynastic Evolution of Marrakech

The Dynastic Evolution of Marrakech ALMORAVIDS 1062–1147 Founded city; capital of a vast empire ALMOHADS 1147–1269 Conquered & rebuilt city, Koutoubia MARINIDS 1269–1554 Capital moved to Fez; Marrakech regional hub SAADIANS 1554–1659 Restored city; imperial peak; El Badi & Saadian Tombs ALAOUITES 1666–Present Reunified state; 1985 UNESCO inscription

1. The Almoravid Foundation (1062–1147 CE)

The foundation of Marrakech marks the pivotal moment when nomadic Sanhaja Berber tribes from the western Sahara formed an organized imperial state under the banner of puritanical Islamic reform [4], [7].

  • The Co-Founders: The city’s initial encampment was chosen around 1062 CE by chieftain Abu Bakr ibn Umar, but its structural layout and administrative consolidation were executed by his cousin and successor, Yusuf ibn Tashfin (r. 1061–1106 CE), who formally took the title Amīr al-Muslimīn ("Commander of the Muslims") [4], [7].
  • Imperial Expansion: From Marrakech, Yusuf ibn Tashfin launched campaigns that unified Morocco, crossed the Strait of Gibraltar into Al-Andalus, and checked the Christian advance at the Battle of Sagrajas (1086 CE) [4], [9].
  • Urban Fortifications: Under Sultan Ali ben Yusuf (r. 1106–1143 CE), the city was encircled in 1126–1127 CE by massive rammed-earth (pisé) ramparts extending over 19 kilometers with fortified monumental gateways (babs), including Bab Doukkala and Bab Aylan [22].
  • Almoravid Koubba (Qubba al-Ba'adiyyin): The only surviving intact Almoravid architectural structure in Marrakech today, displaying sophisticated dome vaulting and polylobed arches that directly influenced Andalusian-Maghrebi architectural aesthetics [1], [15].

2. The Almohad Caliphate (1147–1269 CE)

In 1147 CE, the Almohads (al-Muwahḥidūn, "The Unitarians"), an Amazigh reformist movement from the Masmuda tribe rooted in the mountain fortress of Tinmel in the High Atlas, conquered Marrakech under Caliph Abd al-Mu'min [5], [23], [26].

ALMOHAD IMPERIAL URBAN PROGRAM

  • The Koutoubia Mosque (Jāmiʿ al-Kutubiyyah): Completed under Caliph Yaqub al-Mansur (late 12th century); 77-meter sandstone minaret with sebka lattice brickwork; direct architectural prototype for the Giralda (Seville) and Hassan Tower (Rabat).
  • The Imperial Kasbah & Bab Agnaou: Establishment of the royal administrative citadel in the south, anchored by Bab Agnaou, a monumental horseshoe arch carved in bluish-grey gritstone with floral and Koranic calligraphic friezes.
  • Expeditions Across Al-Andalus & North Africa: Marrakech directed imperial administration from Lisbon to Tripoli; a cultural renaissance fostered the philosophers Averroes (Ibn Rushd) and Ibn Tufayl.

The Almohads purified and redesigned Marrakech's religious architecture, demolishing Almoravid mosques deemed improperly aligned with Mecca and substituting them with monumental hypostyle congregational mosques [1], [5], [16]. Under Caliph Abu Yaqub Yusuf and his son Yaqub al-Mansur (r. 1184–1199 CE), Marrakech reached the pinnacle of its medieval intellectual and architectural influence [10], [16].


3. The Marinid Shift to Fez (1269–1554 CE)

In 1269 CE, the nomadic Zenata Berber dynasty of the Marinids captured Marrakech, deposing the last Almohad caliph [6], [10].

  • Relocation of the Capital: The Marinids transferred the imperial capital northward to Fez, establishing the administrative palace city of Fes el-Jdid [6], [22].
  • Marrakech’s Regional Role: Although stripped of primary capital status for nearly three centuries, Marrakech remained the dominant southern commercial metropolis, spiritual node, and military base for expeditions against Atlantic coastal incursions [1], [6].

4. The Saadian Renaissance (1554–1659 CE)

The 16th century witnessed the dramatic revival of Marrakech under the Saadi Sultanate, an Arab dynasty tracing descent directly from the Prophet Muhammad (Sharifian lineage) originating from the Draa River valley [2], [13], [17].

The Saadian Monumental Revival

  • Defeat of the Portuguese: After victory at the Battle of the Three Kings (1578), vast ransom wealth poured into Marrakech.
  • El Badi Palace ("The Incomparable"): Constructed by Sultan Ahmad al-Mansur using Italian Carrara marble, gold leaf, and onyx.
  • Saadian Tombs: Sealed royal mausoleum featuring the Hall of Twelve Pillars with muqarnas plasterwork and cedar carvings.
  • Ben Youssef Madrasa: Rebuilt in 1564–1565 as North Africa's largest theological college, housing up to 900 Quranic scholars.

The Saadians re-established Marrakech as their primary royal capital, transforming the southern Kasbah quarter into a dazzling display of Renaissance-era Islamic wealth and diplomatic prestige [2], [13], [17].


5. The Alaouite Dynasty & the Modern Era (1666–Present)

In the mid-17th century, the Alaouite Dynasty—Morocco’s reigning royal family—consolidated power across the kingdom [10], [18].

  • Dynastic Continuity: Sultan Moulay Ismail (r. 1672–1727) shifted the primary imperial seat to Meknes and used materials from the El Badi Palace for his own monuments, but Marrakech remained a key royal residence and southern capital [10], [20].
  • Late 19th-Century Palaces: Under Grand Vizier Ba Ahmed and Alaouite monarchs, monumental residential estates such as the Bahia Palace and Dar Si Said were built, exemplifying modern Moroccan decorative arts (zellige, painted wood zouak, and stuccowork) [1], [13].
  • UNESCO Inscription (1985): The Medina of Marrakech was inscribed on the UNESCO World Heritage list in 1985, recognized as an outstanding living urban landscape [1], [25].

Architectural & Spatial Anatomy of the UNESCO Medina

The historic Medina of Marrakech forms an irregular polygon covering approximately 600 hectares, protected by 19 kilometers of pinkish-ochre rammed earth (tabia / pisé) walls [1], [8], [22].

Spatial Sectors of the Marrakech Medina

  • Northern & Central Medina: Ben Youssef Complex (Madrasa, Mosque, Almoravid Koubba); covered souks guilds (Souk Semmarine, Souk el-Attarine, Chichawa); craft enclaves (Dyers' Souk / Souk des Teinturiers, leather tanners); fondouqs and caravanserais (merchant lodging and trade depots)
  • Central Public Axis: Jemaa el-Fnaa Square (oral storytelling, music, UNESCO Intangible Heritage); Koutoubia Mosque & Gardens (77m minaret, urban landmark)
  • Southern Royal Kasbah: Bab Agnaou (Almohad ceremonial gate); Saadian Tombs mausoleum complex; El Badi Palace ruins and sunken orange gardens; Dar al-Makhzen (royal palace) and Mechouar; Mellah (historic Jewish quarter, founded 1558)
  • Historic Periphery & Water Gardens: Menara Gardens & Pavilion (Almohad basin and olive groves); Agdal Gardens (500-hectare Almohad royal agricultural domain)

Key Architectural Typologies

  1. The Riad System: Inward-facing domestic residences structured around central courtyard gardens with fountains, designed for family privacy, acoustic insulation, and thermal regulation in the hot Haouz climate [1], [15].
  2. The Fondouq (Caravanserai): Two- and three-story arcaded commercial buildings where trans-Saharan merchants lodged, stabled pack animals, and conducted wholesale transactions [1], [7].
  3. The Ramparts & Gateways (Babs): Engineered from gravel, lime, and local red clay, giving Marrakech its world-famous rose-ochre color palette that changes hue with the angle of the sun [15], [22].

Comprehensive Chronological Timeline

Year / Period Historic Milestone & Event Citations
c. 1062 CE Abu Bakr ibn Umar establishes the initial Almoravid encampment on the Haouz Plain. [4], [7]
1070–1072 CE Yusuf ibn Tashfin formally establishes Marrakech as the imperial capital of the Almoravid Empire. [1], [3], [15]
1126–1127 CE Sultan Ali ben Yusuf constructs the 19-km rammed-earth (pisé) ramparts to protect against Almohad incursions. [22]
1147 CE Almohad forces conquer Marrakech under Abd al-Mu'min, establishing it as the capital of their caliphate. [1], [5], [23]
1184–1199 CE Reign of Caliph Yaqub al-Mansur; completion of the Koutoubia Mosque minaret and Kasbah district. [10], [16], [26]
1269 CE Zenata Marinid forces capture Marrakech; the royal capital moves north to Fez (Fes el-Jdid). [6], [10]
1554 CE Saadian dynasty secures Marrakech, restoring it as the primary royal capital of Morocco. [2], [13], [17]
1564–1565 CE Sultan Abdallah al-Ghalib completes the construction of the grand Ben Youssef Madrasa. [13], [17]
1578–1593 CE Sultan Ahmad al-Mansur builds the El Badi Palace and begins the Saadian Tombs complex. [2], [13], [17]
1666–1669 CE Alaouite dynasty conquers Marrakech, initiating centuries of continued royal patronage. [10], [18], [24]
Late 19th c. Construction of the Bahia Palace and Dar Si Said under Grand Vizier Ba Ahmed and Sultan Moulay Hassan I. [1], [13]
1985 UNESCO inscribes the Medina of Marrakech onto the World Heritage List (Ref. 331). [1], [8], [25]
2001 / 2008 UNESCO proclaims the cultural space of Jemaa el-Fnaa a Masterpiece of Oral and Intangible Heritage. [1], [14]

Frequently Asked Questions (FAQ)

Who founded Marrakech and when?

Marrakech was founded between 1062 and 1072 CE by the Almoravid dynasty under leaders Abu Bakr ibn Umar and Yusuf ibn Tashfin [1], [4], [7]. It served as the capital of an expansive empire spanning Morocco, Mauritania, and southern Spain (Al-Andalus) [4], [9].

How did Marrakech give Morocco its name?

The name "Morocco" is the Latinized and European phonetic corruption of "Marrakech" (via Spanish Marruecos and Portuguese Marrocos) [3]. Medieval European travelers and cartographers referred to the entire realm as the "Kingdom of Marrakech," which eventually evolved into the modern country name [3].

Why is Marrakech called the "Red City"?

Marrakech is nicknamed the "Red City" (al-Madīnah al-Ḥamrāʾ) because its historic 19-kilometer ramparts, gates, and traditional medina buildings were constructed from local red clay, earth, and lime (tabia or rammed earth) extracted directly from the Haouz Plain [15], [22].

What are the most important UNESCO World Heritage monuments in Marrakech?

Key monuments within the 1985 UNESCO inscribed perimeter include the Koutoubia Mosque and Minaret, the Ben Youssef Madrasa, the Almoravid Koubba, the Bab Agnaou Gate, the El Badi Palace, the Saadian Tombs, the Menara and Agdal Gardens, and the vibrant square of Jemaa el-Fnaa [1], [12], [25].

What was the historical rivalry between Marrakech and Fez?

Marrakech and Fez represent the two historical poles of Moroccan imperial power [6]. Marrakech was the southern imperial capital of the Berber Almoravids and Almohads and the Sharifian Saadians, whereas Fez was the northern intellectual capital founded by the Idrisids and expanded by the Marinids [1], [2], [6]. Moroccan dynasties frequently alternated capitals between the two cities to balance northern Mediterranean and southern Saharan interests [6], [13].


Continue Exploring

Nearby city guides

  • Essaouira City Guide — Marrakech's historic Atlantic port outlet, a walled medina and sea breeze a few hours to the west.
  • Ait Benhaddou City Guide — the iconic mud-brick ksar on the caravan road over the Tizi n'Tichka toward the Sahara.
  • Oukaimeden City Guide — High Atlas ski slopes, mule trails, and ancient rock engravings south of the city.

Practical guides for this trip


Sources & Complete Bibliography

  • [1] UNESCO World Heritage Centre. Medina of Marrakesh (Site #331). Comprehensive heritage evaluation, criteria (i)(ii)(iv)(v), and historical overview from 1070–1072 CE foundation through Almohad and Saadian rule. Available at: https://whc.unesco.org/en/list/331/

  • [4] Encyclopaedia Britannica. Almoravids: Berber Dynasty, Islamic Empire, North Africa. Analysis of 1062 CE capital foundation at Marrakech and Yusuf ibn Tashfin assuming the title of Amīr al-Muslimīn. Available at: https://www.britannica.com/topic/Almoravids

  • [6] UNESCO World Heritage Centre. Medina of Fez (Site #170). Comparative historical analysis of the 13th–14th century Marinid capital shift replacing Marrakech. Available at: https://whc.unesco.org/en/list/170/

  • [8] UNESCO World Heritage Centre. Medina of Marrakesh: Cartographic Boundaries & Buffer Zones (1:10,000 Map). Topographic mapping and legal status documents. Available at: https://whc.unesco.org/en/list/331/maps/

  • [13] Introducing Marrakech. History of Marrakech: From the Almoravids to the Alaouites. Detailed timeline of Saadian 16th-century capital prominence and modern royal history. Available at: https://www.introducingmarrakech.com/history

  • [16] UNESCO World Heritage Centre. Medina of Marrakesh Video Archive. Multi-century analysis of the city's political, economic, and architectural influence across the Maghreb. Available at: https://whc.unesco.org/en/list/331/video

  • [19] UNESCO World Heritage Centre. Medina of Essaouira (Site #753). Comparative analysis of Atlantic Moroccan port fortifications. Available at: https://whc.unesco.org/en/list/753/

  • [22] UNESCO World Heritage Centre. Advisory Body Evaluation & Ramparts Document 153207. Archaeological verification of the 1126–1127 CE ramparts built under Ali ben Yusuf. Available at: https://whc.unesco.org/document/153207

  • [23] Embassy of the Kingdom of Morocco in Japan (Diplomatie.ma). History of Morocco: The Almohad Dynasty. Origins from the High Atlas (Al-Muwahhidun), doctrinal purity, and statecraft. Available at: https://jp.diplomatie.ma/en/history-of-morocco

  • [25] UNESCO World Heritage Centre. States Parties: Morocco (World Heritage Sites List). Official registry documenting the 1985 inscription of the Medina of Marrakesh. Available at: https://whc.unesco.org/en/statesparties/ma/

  • [26] Al Ksar Cultural Journal. History of Marrakech: The Masmuda Berbers and the Tinmel Revolution. Origins of the Almohad dynasty in 1120 CE under Ibn Tumart and their reign in Marrakech. Available at: https://www.alksar.com/en/history-of-marrakech/

  • [27] UNESCO World Heritage Centre. Historic City of Meknes (Site #793). Comparative evaluation of 1061 AD Almoravid military foundations and Berber tribal dynamics. Available at: https://whc.unesco.org/en/list/793/

Last reviewed: 2026-10-10 by morocc.co editorial team.