Almoravid Origins Marrakech
Who founded Marrakech, and what is left of their city today?
Marrakech was founded in the 11th century by the Almoravids, Berber nomads of the Sanhaja Lamtuna tribe who came up from the Sahara and set up their camp on the empty Haouz plain, at the foot of the Atlas. They built a fortress of stone, Ksar el Hajar, next to where the Koutoubia stands today, then mud-brick walls of red earth, mosques, and the khettaras, underground channels that brought water from the mountains. Their empire fell to the Almohads in the 12th century, and most of their city disappeared. But you can still walk through what remains, the Almoravid Koubba near Ben Youssef, the traces of Ksar el Hajar beside the Koutoubia, the red walls and the oldest heart of the Medina. Our Private Medina Walking Tour follows these traces with a local guide who tells the story of the city from its very first day.
Private Medina Walking Tour
Your own local guide, every day at 9 am or 2 pm, about 3 hours, with pickup at your riad.
Included a relaxing stop at a traditional herbalist and spice cooperative, just to learn, with no obligation to buy, with a bottle of mineral water, a cup of mint tea and a small souvenir, all complimentary.
See prices and details on our Private Medina Walking Tour page.
Message Us On WhatsApp or use our Booking Form.
Stand in front of the Almoravid Koubba and look down. The little domed building sits several meters below the street, in a hollow, because the city has grown on top of itself for nine centuries. Every layer of earth above it is a page of history. Our guests are always surprised that the oldest building of Marrakech is so small, so hidden, and so beautiful inside. Then our guide explains that this is where the water arrived, where the city began, and everything else in the Medina suddenly makes sense.
Visit Marrakech Medina, The Best Shopping and Walking Tour Company in Marrakech, has guided travelers through the Medina since 2004. Our Medina walking tour is featured by Daniel Jacobs in The Rough Guide To Morocco, which says our guide “guarantees (unlike most guides) not to stop at any shops”. Our guiding is also Recommended By Rick Steves.
Choose your tour
• Who Can Show You Where Marrakech Began? Our private walking tour, Jemaa el-Fna, the Koutoubia, the souks, Ben Youssef, the Mellah and the herbalist.
• Can You Discover The Old Craft Souks Of The First City? Our private souks shopping tour, leather, lanterns, ceramics and spices from the artisans.
• Where Do The Berber Traditions Of The Atlas Live On? Our private rug shopping tour, weaving cooperatives, Beni Ourain, Azilal and kilims.
• Can Your Family Walk Through Nine Centuries With Its Own Guide? All our tours are private, one guide, one group, one truly personal experience.
• Can You Book A History Walk In The Medina Today? Last-minute private tours, often within the hour.
Who were the Almoravids?
The Almoravids, al-Murabitun in Arabic, were a movement of Berber tribes from the western Sahara, mainly the Sanhaja and their Lamtuna branch. They were camel nomads, and their men covered their faces with a veil against the sand, a tradition still kept by the Tuaregs today. In the 11th century, united by a strict religious reform, they moved north out of the desert, took the oases and the trade routes, and conquered Morocco. Under their leaders Abu Bakr ibn Umar and his cousin Yusuf ibn Tashfin, they built an empire that reached from the Sahara to the Ebro in Spain. Marrakech became its capital.
Why did they choose this place to build Marrakech?
• Between two worlds the Haouz plain sits between the Atlantic and the Sahara, on the road of the caravans, a natural meeting point for the trade of salt, gold, leather and grain
• Close to the Atlas the snowy mountains gave water, and the Berber tribes of the Atlas were allies, trading partners and soldiers
• A new city of their own the old town of Aghmat, nearby in the foothills, belonged to others. The Almoravids wanted a neutral, open place to found their own capital
• Space a flat, empty plain where a camp could grow into a city
Marrakchis also tell their own version, passed from generation to generation. The founders, after a hard battle at the foot of the Atlas, chose to settle on this plain, and built with the red earth they found on the spot, protected by walls. Like many founding stories, it mixes memory and legend, but it explains well why the city is red and why it was built to be defended.
How was the first city built?
The camp
It all started with tents. In the 11th century, the Almoravids set up their military camp on the plain, and the first houses, markets and mosques grew around it.
Ksar el Hajar, the castle of stone
The first solid building was a fortress of stone, Ksar el Hajar, which held the treasury and the weapons of the new state. It stood right next to where the Koutoubia was built later, and archaeologists have uncovered its remains there.
The red walls
In the 12th century, the sultan Ali ibn Yusuf surrounded the city with walls of pisé, rammed red earth, with towers and gates. They have been rebuilt and extended many times since, but the idea, and the color, come from the Almoravids. The holes you see in the walls today held the wooden scaffolding during construction, not pigeons and not spies.
Water from the mountains
Ali ibn Yusuf's engineers dug the khettaras, long underground channels that carried water from the Atlas to the city, to cisterns, gardens, mosques, hammams and public fountains. Without them, Marrakech could never have grown in this dry plain.
The great mosque
Ali ibn Yusuf built a great mosque in the heart of the city, the largest of the Almoravid empire. It was rebuilt later, and today's Ben Youssef Mosque stands on the same spot and keeps his name.
Where does the name Marrakech come from?
The name is Amazigh, the language of the Berbers. It is most often explained as "mur n akuch", the land of God. Over the centuries, the city became so important that its name traveled far beyond it. Persians, Turks and Europeans called the whole country after its capital, which is why Morocco is still Marrakech in many languages, Marruecos in Spanish, Marocco in Italian and Maroc in French. Its nickname, the Red City, comes straight from the red earth the Almoravids built with.
Discover more stories that guidebooks rarely tell in What Can't You Find In Other Marrakech Guides?
What can you still see of Almoravid Marrakech?
• The Almoravid Koubba the only Almoravid building of Marrakech still standing almost intact, a small domed ablution pavilion with a delicately carved interior, near the Ben Youssef Madrasa
• The remains of Ksar el Hajar beside the Koutoubia, where the first fortress stood
• The red walls and gates rebuilt many times, but following the line and the spirit of the first ramparts
• The khettaras mostly underground and dry today, but you can understand the old water system at Le Jardin Secret in Mouassine
• The Ben Youssef quarter the oldest heart of the Medina, around the mosque that keeps the name of Ali ibn Yusuf
• The plan of the city the Medina grew in circles around this first core, the oldest lanes in the center, the later quarters toward the walls
How do you walk the Almoravid trail?
This route takes about 2 hours at a slow pace, from the first fortress to the first heart of the city. Each link opens the walking route on Google Maps.
• Jemaa El-Fna To The Koutoubia And Ksar El Hajar about 400 meters, 6 minutes
• The Koutoubia To Souk Semmarine about 700 meters, 10 minutes
• Souk Semmarine To Le Jardin Secret And Its Water System about 600 meters, 9 minutes
• Le Jardin Secret To The Almoravid Koubba about 450 meters, 7 minutes
• The Almoravid Koubba To The Ben Youssef Mosque about 100 meters, 2 minutes
• The Almoravid Koubba To The Ben Youssef Madrasa about 100 meters, 2 minutes
• The Almoravid Koubba To Bab Doukkala about 1.3 km, 18 minutes
• The Almoravid Koubba To Bab Debbagh And The Tanneries about 900 meters, 13 minutes
• The Almoravid Koubba Back To Jemaa El-Fna about 1.1 km, 15 minutes
Distances are approximate. For a quiet way back through the souks, read What Is The Secret Loop Of The Medina?
Which riads are close to the oldest heart of the Medina?
The riads of Derb El Cadi and Azbezt, near Ben Youssef, are a few minutes from the Almoravid Koubba. Each link opens the walking route from the riad. We pick our guests up at their riad, wherever it is in the Medina.
• From Riad Jnan El Cadi In Azbezt about 5 minutes on foot
• From Riad Les Ammonites In Derb El Cadi about 5 minutes on foot
• From Riad Zineb In Azbezt about 5 minutes on foot
• From Riad Hizad In Azbezt about 5 minutes on foot
• From Riad Dar Rassam In Azbezt about 5 minutes on foot
• From Riad Al Loune In Azbezt about 5 minutes on foot
• From Riad Johara On Rue Azbezt about 5 minutes on foot
• From Riad Maizie In Derb El Cadi about 6 minutes on foot
• From Riad Karmela Princesse In Azbezt about 6 minutes on foot
Walking times are approximate and depend on the exact entrance of each riad.
How did the Almoravid city shape the Medina you see today?
• The red color the earth of the first builders is still the rule, and the walls are kept ocher, not white. The color absorbs the strong light, and for the Berbers red is the color of life
• The city in circles the first core around Ben Youssef, then rings of later quarters, which is why the oldest, narrowest lanes are in the center
• The craft quarters the workshops of leather, wood and metal grew around the first mosque and the water, and they're still there today
• The neighborhood model mosque, fountain, hammam, farran and Koranic school close together, a plan that started with the first water system
• The Koutoubia built by the Almohads on the site of the Almoravid fortress, and still the tallest building of the city, as nothing may rise above it
Understand how the Medina is organized in How Is The Marrakech Medina Organized For First-Timers? and see the old water fountains in Which Historical Squares And Fountains Shape The Medina?
What happened to the Almoravids?
In the 12th century, a new reform movement rose in the High Atlas, the Almohads, led from the village of Tinmel. After a long siege, they took Marrakech, ended the Almoravid dynasty and destroyed most of its mosques and palaces, saying they were not correctly oriented toward Mecca. They then built their own monuments, the Koutoubia, Bab Agnaou and the Kasbah. That is why so little of the Almoravid city survives, and why the small Koubba near Ben Youssef is so precious.
What are the best tips for exploring Almoravid Marrakech?
• Start early from about 9 am, the lanes around Ben Youssef are calm and the light is soft
• Combine the monuments the Almoravid Koubba, the Ben Youssef Madrasa and the Marrakech Museum are side by side
• Look down, then up the Koubba sits below today's street level, and its beauty is inside the dome
• Respect the mosques non-Muslims cannot enter most mosques in Morocco, including Ben Youssef
• Ignore street helpers people who say a monument is "closed today" usually want to lead you to a shop
• Go with a guide the traces are discreet and easy to miss without someone who knows the story
Lost in the lanes? Read Why Does Google Maps Fail Near Ben Youssef? and meet the craftsmen of the old core in Who Are The Last Artisans Of The Marrakech Medina?
What Happens On A Real Tour With Us?
Family from Canada
"He explained the history in a way that kept our whole family engaged."
What Do Our Guests Usually Ask On The Tour?
Traveler from the United Kingdom
"Our guide knows Marrakech inside and out."
What Surprises Travelers Most On Our Walks?
Traveler from the United States
"Our guide's passion for the city really shows."
Our tours are rated 5 stars on Google. Read Our Google Reviews
Ready to walk through nine centuries of history with a local? Book On WhatsApp for a fast reply, or use our Booking Form.
Who Wrote This Guide?
This guide was written by the Local Team of Visit Marrakech Medina, Marrakchis who were born and raised in the Medina and have guided travelers through its history, souks and derbs since 2004. Our Medina walk is featured in The Rough Guide to Morocco, and our guiding is recommended by Rick Steves. Everything here comes from what we see and hear on our tours every day, and from the stories passed down in the Medina.
Have a question about your trip, even if you don't book a tour? Ask Us On WhatsApp. We're happy to help travelers plan their days in Marrakech.
Found this guide useful? Save it for your trip or share it with a friend who's heading to Marrakech.
Writing about Marrakech? Feel free to link to this guide, or contact us for local insights and photos.
Visit Marrakech Medina is an independent local specialist resource dedicated to discovering and understanding the Marrakech Medina. Our Marrakchi team has been guiding visitors through the Medina since 2004. We share firsthand local knowledge of its traditional souks, streets and derbs, neighbourhoods, historic gates, squares, monuments, artisan workshops, traditional crafts, architecture and everyday life. Our guides explore the history, geography, traditions and authentic character of the Medina, providing detailed information about the places, people and activities that make Marrakech's old city unique.
This guide is part of our coverage of the history, architecture and traditions of Marrakech Medina.
Discover our full range of authentic Marrakech tours on our Visit Marrakech Medina homepage.