Discovering...
Discovering...

The red pise ramparts that ring the medina are the reason Marrakech is called the Red City. Raised in the 12th century and stretching nearly 19 kilometres, they are pierced by a series of historic gates, each with its own character and its own quarter beyond. This guide runs through the major babs — from the ceremonial Bab Agnaou to the tannery gate of Bab Debbagh — and the best ways to see the walls on foot, by caleche or by bike.
What they are
The medieval pise walls and gates enclosing the medina
First built
Early 12th century, under the Almoravids
Length
Nearly 19 km around the old city
Material
Red pise (rammed earth), giving the 'Red City' colour
Gates
Around twenty historic babs
Grandest gate
Bab Agnaou, the ceremonial Kasbah gate
Best light
Late afternoon, for the deepest red tones
Yasmine El Amrani· Marrakech & Atlas Editor
Marrakech-born travel writer who has spent the last decade walking the medina’s souks and the High Atlas trails above Imlil. She covers the Red City, Berber villages and day trips into the mountains. Marrakech · 12+ years covering Morocco
Published 9 November 2024 Last updated 17 July 2026
Marrakech earns its nickname the Red City from these ramparts. They were first raised in the early twelfth century under the Almoravid sultan Ali ibn Yusuf to defend the young capital, and they were built from pise — a rammed-earth technique using the reddish local soil mixed with lime and packed into timber forms. That earthy red-ochre colour, repeated across the medina's houses by decree in later eras, is what gives the whole city its warm, unified glow, and it is the walls that set the tone.
Over the centuries the ramparts were repaired, extended and heightened by successive dynasties, so what you see today is a composite of many periods, still substantially following the medieval line. They run for nearly nineteen kilometres around the old city, rising to roughly eight or nine metres in places, thickened with square towers and broken by the gates that let the roads in and out. Pise needs constant maintenance, so you will often see sections being re-rendered — part of a living tradition of upkeep that has kept the walls standing for 900 years.
If you see only one gate, make it Bab Agnaou. Built in the twelfth century under the Almohad caliph Yaqub al-Mansour, it was the ceremonial entrance to the royal Kasbah, and unlike the plain working gates it is a genuine monument: a monumental arch of carved blue-grey Gueliz stone, framed by concentric bands of floral and calligraphic decoration and a shell-like carved surround. It stands out from the red pise around it precisely because it was meant to impress those approaching the seat of power.
Bab Agnaou leads into the Kasbah quarter, the historic royal district that also holds the Saadian Tombs and the ruins of El Badi. That makes it the natural starting point for exploring the southern medina, and it is covered in more depth, as the gateway to that walk, in our Kasbah walking route guide. Stand back to take in the carving, then pass through into the quieter, grander streets of the old royal city — the contrast between the ornate gate and the working ramparts either side of it tells you a lot about how the medieval city was ordered.
Most of the other babs are working gates, and their interest lies in the living quarters they open onto rather than in grand architecture. Bab Debbagh, on the eastern wall, is the tanneries gate — pass through it and you are in the malodorous, fascinating district where hides are still cured in the traditional way. Bab el Khemis, to the north, is the Thursday Gate, named for the flea market and second-hand souk that spills out beside it, one of the most local corners of the city. Bab Doukkala guards the northwestern approach near the bus and transport axes.
To the south, Bab er Robb sits close to Bab Agnaou and historically controlled the road towards the Atlas and Asni, while Bab el Jdid opens near the gardens on the western side. Each gate has its own trades, markets and character, and passing through them is one of the best ways to feel the medina as a lived-in city rather than a museum. The table below lists the major gates and what lies beyond each, so you can pick the ones that match where you are heading.
| Gate (Bab) | Side | Known for / leads to |
|---|---|---|
| Bab Agnaou | South | Ceremonial Kasbah gate; Saadian Tombs, El Badi |
| Bab er Robb | South | Near Bab Agnaou; old road towards the Atlas |
| Bab Debbagh | East | The tanneries district |
| Bab Aylen | East | One of the oldest gates; residential quarters |
| Bab el Khemis | North | The Thursday flea market and second-hand souk |
| Bab Doukkala | Northwest | Transport axes; the Doukkala quarter |
| Bab el Jdid | West | Near the western gardens and hotels |
You do not need to walk all nineteen kilometres to appreciate the ramparts — pick a method to suit your energy and time. On foot, the most rewarding stretch is the southern and western walls around the Kasbah and towards the gardens, where you can combine wall-watching with the Bab Agnaou monuments. The classic tourist option is a horse-drawn caleche, which does a leisurely circuit of the walls in about an hour, letting you see long sweeps of rampart and multiple gates without effort; agree the fare before you set off.
Cyclists and e-bikers can follow the roads that hug the outside of the walls for a faster, more complete loop, best attempted early or late to avoid traffic and heat. Whatever the method, timing matters more than the mode: the pise turns its deepest, most photogenic red in the low, warm light of late afternoon, when long shadows pick out the texture of the rammed earth and the towers. The table below compares the options so you can match the walls to the way you most enjoy travelling.
| Method | Best for | Time | Notes |
|---|---|---|---|
| On foot | Detail, combining with Kasbah sights | 1-2 hrs (a section) | Free; choose the southern/western walls |
| Caleche (horse carriage) | An easy full loop, families | ~1 hr | Agree fare first; classic circuit |
| Bike / e-bike | A faster complete circuit | 1-1.5 hrs | Go early/late; mind the traffic |
| Petit taxi drive-by | A quick orientation | 20-30 min | Cheap; less atmospheric |
The ramparts are one of the best photographic subjects in Marrakech, but the light makes or breaks the shot. Aim for the golden hour before sunset, when the western sun rakes across the pise and turns it a deep, saturated red, throwing the towers and the pattern of the rammed earth into relief. The western and southern walls catch this light head-on, so a late-afternoon walk or caleche along that side, finishing near the gardens, is the reliable way to see the Red City actually looking red.
Early morning is the quieter alternative, cooler and with softer light and fewer people, good for detail shots of gates like Bab Agnaou. Avoid the flat, harsh light of midday, which drains the colour out of the walls. Keep an eye out for storks nesting on the towers and old gates — a common and photogenic sight — and remember that the gates are busy working thoroughfares, so stand clear of the traffic of scooters, carts and taxis pouring through them as you frame your shot.
The ramparts work best as a frame for the rest of your sightseeing rather than a standalone outing. A natural plan is to spend the day in the southern medina — the Kasbah, the Saadian Tombs and the palaces and museums — entering and leaving through Bab Agnaou, then close with a late-afternoon caleche loop of the walls as the light turns and the pise glows. That way the ramparts bookend a day of interiors with a sense of the city's overall shape and defences.
Because the gates open onto such different worlds — tanneries at Bab Debbagh, flea market at Bab el Khemis, royal quarter at Bab Agnaou — you can also use them to plan which quarter to explore next. Orientation is the practical payoff: once you understand the ring of walls and where each bab sits, the medina's tangle of lanes makes far more sense, and you always know which gate to aim for when you want to get out to a taxi, a bus or the gardens beyond.
The ramparts are not just a backdrop; they are the reason Marrakech took the shape it did. By enclosing the medina, they fixed the boundary between the old city and everything built later, which is why the walled medina remains so distinct from the modern districts of Gueliz and Hivernage beyond. For most of the city's history the gates were shut at night and controlled who and what came in and out, so the walls governed the rhythm of trade, defence and daily life as much as they defined the skyline.
That role echoes into the present. The walled medina is inscribed as a UNESCO World Heritage site, and the pise ramparts are a large part of what that recognition protects, alongside the monuments and the living urban fabric inside them. Modern Marrakech has grown far beyond the walls, but planning rules that keep the medina low-rise and red-toned mean the ramparts still read as the edge of the historic city rather than a relic marooned in traffic. Walking or riding their circuit remains the single best way to grasp the medina as a whole before you dive into its lanes.
Because of these ramparts and the medina they enclose. The 12th-century walls are built from pise, rammed earth made with the reddish local soil, giving them a warm red-ochre colour. Later eras extended that colour across the city's houses, so the whole medina glows the same red, especially in low light. The walls set the tone, and a late-afternoon walk or ride alongside them is the best way to see Marrakech actually looking like the Red City.
Bab Agnaou is the grandest of Marrakech's gates, built in the 12th century under the Almohads as the ceremonial entrance to the royal Kasbah. Unlike the plain working gates, it is a carved monument of blue-grey stone framed by bands of floral and calligraphic decoration. It leads into the Kasbah quarter, home to the Saadian Tombs and El Badi, and makes the natural starting point for exploring the southern medina.
They run for nearly 19 kilometres around the medina, rising to roughly eight or nine metres in places and thickened with square towers, broken by around twenty historic gates. You do not need to see all of them — the most rewarding stretches are the southern and western walls near the Kasbah and gardens. A horse-drawn caleche circuit covers a long sweep of the ramparts and multiple gates in about an hour.
It depends on your energy. On foot you get detail and can combine the southern walls with the Kasbah sights; a horse-drawn caleche does an easy full loop in about an hour; and a bike or e-bike covers a faster complete circuit if you go early or late to dodge traffic and heat. Whatever you choose, aim for late afternoon, when the low sun turns the pise its deepest, most photogenic red.
Bab Debbagh, on the eastern wall, is the tanneries gate — passing through it brings you into the district where hides are still cured in the traditional way. It is one of several working gates whose interest lies in the living quarter beyond rather than in grand architecture, alongside Bab el Khemis (the Thursday flea market) to the north and Bab Doukkala (transport axes) to the northwest.
The golden hour before sunset is best, when the western sun rakes across the pise and turns it a deep, saturated red, picking out the towers and the texture of the rammed earth. The western and southern walls catch this light head-on. Early morning is a quieter alternative with softer light, good for gate detail, while harsh midday sun drains the colour and is best avoided. Watch for storks nesting on the towers.
Plan it with a local expert
Crafting extraordinary journeys through Morocco's timeless landscapes. 100% private journeys, handcrafted around you.
from $2,011Sahara Desert Luxury Expedition
from $2,054Essential Morocco: Imperial Cities Circuit
from $5,978Sahara to Sea: Morocco Complete
Attractions & Heritage
Self-guided route: Bab Agnaou, Kasbah Mosque, Saadian Tombs, El Badi, mellah, ending Bahia.
Read guideAttractions & Heritage
The rediscovered Saadian necropolis, Chamber of Twelve Columns, queue strategy.
Read guideAttractions & Heritage
Bahia and El Badi palaces, Dar Si Said, the Marrakech and Photography museums and Musee YSL on one walkable route.
Read guideActivities & Experiences
The iconic Marrakech caleche: routes around the ramparts and Palmeraie, fares, duration and animal-welfare pointers.
Read guideAttractions & Heritage
Olive-grove basin + pavilion, Atlas-backdrop photos, how to get there, is it worth it.
Read guideAttractions & Heritage
How to navigate and shop the medina souks by specialist zone, with haggling tips, fair prices and shipping advice.
Read guide