Walls of Marrakesh

City Gate and City Walls in Marrakesh

Marrakech City Gate
Marrakech City Gate
CC BY-SA 2.0 / János Korom Dr

The Walls of Marrakech are the city's great, terracotta frame: nearly 20 kilometres of rammed-earth ramparts, punctuated by square towers and monumental gates, wrapping around the medina in a warm, reddish-brown circle. First built in the early 12th century under the Almoravids and expanded under the Almohads, Saadians, and Alaouites, they tell the story of Marrakech in layers-each new dynasty extending or repairing them as the city shifted, grew, and changed. Walking beside these walls at sunset, when they glow orange and pink, is often visited on walking tours of Marrakech and remains one of the top sights in Marrakech for anyone who loves urban history.

Beyond their photogenic looks, the walls and gates are a living piece of infrastructure. Everyday traffic passes through historic gateways like Bab Doukkala and Bab el-Khemis, while more modern openings such as Bab Nkob and Bab Jdid stitch the medina to the newer districts of Gueliz and Hivernage. At different points you can see the join between Almoravid foundations, Almohad kasbah extensions, and later Alaouite repairs, as well as the rammed-earth construction scars and patchwork restorations that keep the ramparts standing today.

History and Significance of the Walls of Marrakech

When Abu Bakr ibn Umar founded Marrakech in 1070, the city's first major fortification was not a perimeter wall but the Ksar al-Hajjar, a stone citadel protecting the treasury near where the Koutoubia Mosque now stands. Only in 1126 did the Almoravid ruler Ali ibn Yusuf decide to encircle the growing settlement with full ramparts, urged on by advisers such as the jurist Abu-l-Walid ibn Rushd and the looming threat of the Almohad movement in the mountains. In an impressive feat of medieval engineering and organisation, the walls were reportedly laid out with ropes, blessed by astrologers, and completed in under a year, defining an irregular quadrilateral whose outline largely survives today.

The Almohads conquered Marrakech in 1147, repurposed the old citadel for a while, and then built their own royal district: the Kasbah, attached to the south of the original medina. Caliph Ya'qub al-Mansur added new walls, gates, and the vast Agdal Gardens, turning the south side of the city into a palace-zone of mosques, mechouars (ceremonial squares), and orchards. Later dynasties layered their own priorities onto this framework. The Saadians renovated the kasbah, extended the eastern outline to form the Mellah (Jewish quarter), and built palaces like El Badi. The Alaouites then expanded the walls again to include the growing neighbourhood around the Zawiya of Sidi Bel Abbes and joined the kasbah and Agdal ramparts into a single southern enclosure.

Throughout these changes, the ramparts were always built and repaired using rammed earth, or tabia: a mixture of local soil, straw, and lime compacted in wooden formwork. This inexpensive but permeable material explains both the walls’ endurance and their constant need for maintenance. Erosion marks, repair patches, and the ghostly rows of small holes left by the old wooden boards are all part of their character. Today, the walls stand between 6 and 8 metres high, with towers every 25-30 metres and major gates like Bab el-Khemis, Bab Doukkala, Bab Debbagh, Bab Aghmat, and Bab al-Makhzen still guiding movement in and out of the medina, even as new roads and simple openings have been cut through the ancient barrier.

Things to See and Do in the Walls of Marrakech

The simplest-and arguably best-way to experience the walls is to follow them on foot or by carriage around part of their length. Start, for example, near Bab el-Khemis in the northeast, where the Thursday market gave the gate its name, and wander along the outside edge of the ramparts, watching how modern traffic interacts with medieval infrastructure. You will pass bastions, patched sections of rammed earth, and stretches where the walls seem almost brand new thanks to recent restoration, contrasted with others where erosion has begun to bite.

Seek out specific historic gates to appreciate how defensive design once worked. Bab ad-Debbagh, near the tanneries, hides a complex, multi-bend passage behind its simple façade, while Bab Aghmat and Bab Aylan hint at the old battle lines and caravan routes to the east and south. On the west side, Bab Doukkala still preserves its original bent entrance, even though modern archways now funnel much of the traffic around it. Each gate tells a slightly different story: some were tied to trade routes, others to local markets, and a few-like Bab er-Robb-have particularly unusual layouts connected to the regulation of goods such as cooked grape syrup and wine.

For views and atmosphere, the southern stretches around the kasbah and Agdal are especially rewarding. Here, you can see how the city walls dovetail with palace walls and garden enclosures, and how later Alaouite additions created chains of mechouars and military gates like Bab Ahmar with its artillery platform. Walking outside the ramparts at golden hour, with palm trees, cemeteries, and everyday life spread out on one side and the city’s terracotta skin on the other, is a powerful reminder that these fortifications were always both a boundary and a stage for daily activity.

How to Get to the Walls of Marrakech

Because the walls encircle the medina, you will inevitably encounter them as soon as you approach the old city. Most international visitors arrive via Marrakech Menara Airport, a short drive from the centre with frequent flights from major European and Moroccan cities. For the best deals and a seamless booking experience, check out these flights to Marrakesh on Booking.com. From the airport, taxis and private transfers can drop you at one of the main gates-such as Bab Doukkala, Bab Jdid, or near Koutoubia-where the ramparts are immediately visible.

If you are travelling within Morocco, trains link Marrakech with cities like Casablanca, Rabat, and Tangier, arriving at the modern railway station in Gueliz.Train schedules and bookings can be found on Omio. From there, petit taxis or even a stroll along Avenue Mohammed V and Boulevard Mohamed VI will bring you directly to the walls at Bab Nkob or other openings between the new town and the medina. Long-distance buses from elsewhere in the country also arrive at terminals outside the centre; taxis from these stations will typically deposit you at a nearby gate, making the ramparts an unavoidable reference point as you arrive.

Driving yourself, you will follow ring roads and major avenues that run parallel to or alongside the ramparts. Parking is available at various points just outside the walls, from Bab Doukkala and Bab el-Khemis to Bab Aghmat and Bab Jdid. Once parked, you can explore both inside and outside the walls on foot, using the gates as orientation markers as you move between different medina districts and the newer neighbourhoods beyond.

Practical Tips on Visiting the Walls of Marrakech

  • Suggested tips: Choose one or two stretches of ramparts and a handful of gates to focus on, rather than trying to circle the entire city; pairing the walls with nearby markets or monuments makes for a more balanced outing.
  • Best time to visit: Early morning or late afternoon offer softer light and cooler temperatures, with the walls glowing in shades of orange and red that are perfect for photography.
  • Entrance fee: Free - walking along and around the walls and gates is part of the public streetscape.
  • Opening hours: Accessible at all times, though exploring in daylight is recommended for safety and photography.
  • How long to spend: Allow 1-2 hours to explore a specific section of the walls and a cluster of gates, longer if you are combining this with visits to nearby palaces or gardens.
  • Accessibility: Pavements around the walls can be uneven, dusty, and busy with traffic; some areas have narrow sidewalks or none at all, so extra care is needed, especially at busy junctions.
  • Facilities: Cafés, shops, and small restaurants line many stretches just inside and outside the ramparts; public toilets are limited, but facilities in cafés can usually be used by customers.
  • Photography tip: For classic shots, frame a gate or tower with the Koutoubia minaret or palm trees in the background; side-lighting in the golden hour brings out the texture of the rammed earth beautifully.
  • Guided tours: A local guide or themed city tour can help you understand the differences between Almoravid, Almohad, Saadian, and Alaouite additions and point out lesser-known gates and features.
  • Nearby food options: Look for eateries near Bab Doukkala, Bab el-Khemis, or Bab Jdid, where local snack stalls and more modern cafés sit close to the ramparts and give you easy breaks during your walk.

Where to Stay close to the Walls of Marrakech

Staying close to the Walls of Marrakech gives you the best of both worlds: fast access to the medina through atmospheric gates and quick connections to the new city just beyond the ramparts. Near Bab Doukkala, Riad Kniza offers a luxurious yet traditional riad experience just a short stroll from the walls, making it easy to slip into the old town or hail a taxi outside. Close to the Koutoubia and the western ramparts, Les Jardins de La Koutoubia combines resort-style comforts with rooftop views of the walls and minaret. For a classic address that sits between Bab Doukkala and Bab Nkob, La Maison Arabe provides refined rooms, a beautiful courtyard, and quick access to both the medina and Gueliz via the nearby gates.

Is the Walls of Marrakech Worth Visiting?

The Walls of Marrakech are absolutely worth seeking out, even if you are mainly in the city for souks and gardens. They provide context: a physical, walkable outline of the medieval city, showing how each dynasty shaped and defended Marrakech over nearly nine centuries. Whether you are photographing gates at sunset, tracing the line between old and new neighbourhoods, or simply using the ramparts to orient yourself, they add depth and coherence to your experience of the city, making them one of the must-see places in Marrakech for curious travellers.

What Other Travellers Say...

Reviews Summary

Wall Marrakech sits as the reddish-brown perimeter of the old medina, offering a well-preserved, walkable route past historic gates, parks and benches where birds nest in the wall’s cavities; visitors recommend strolling early in the morning for a quieter three-hour circuit, note that much of the route looks similar so it’s best if you enjoy walking along defensive walls, and highlight that it’s a striking, free landmark leading to many nearby sights and lively streets.

Mike & Brittnie Little
2 weeks ago
"The Marrakech City Wall is an impressive sight and a great way to experience the history of the Medina. Its massive, reddish-brown walls surround theold city and give a real sense of Morocco’s architectural heritage. Walking along or near the walls, you can enjoy the bustling streets, historic gates, and vibrant local life. A must-see for history and culture enthusiasts!..."
Trina Talukdar
6 months ago
"It's beautiful! I recommend walking along the wall early morning. The entire walk took me about 3 hours. The road along it is very walkable with goodside walks, parks and benches along the way. There are many birds living in the holes in the walls and they fly around...."
Shaik Masood
9 months ago
"One of the Entrances to the old city Medina. The wall itself is well preserved and lead to many other historical places."

FAQs for Visiting Walls of Marrakech

In most areas, the ramparts are not open as walkable ramparts like some European city walls; you generally explore them from ground level along the streets that run beside them.
The first full circuit of walls dates back to the Almoravid period in the early 12th century, with major extensions and repairs added by later dynasties over the following centuries.
Bab el-Khemis, Bab Doukkala, Bab ad-Debbagh, and Bab Aghmat are among the most historically and architecturally interesting gates, each linked to specific markets, trades, or routes.
Main roads along the ramparts are usually busy and well-lit, but for sightseeing and photography it is better to explore by day; at night, stick to well-trafficked areas and use normal city precautions.
You can appreciate the walls on your own, but a guide or well-researched walking tour can greatly enhance your visit by explaining the history, construction techniques, and stories behind specific gates.

Nearby Attractions to the Walls of Marrakech

  • Koutoubia Mosque: The city's iconic mosque and minaret, standing just inside the western ramparts and acting as a key landmark near several main gates.
  • Jemaa el-Fnaa: Marrakech's legendary main square, a short walk from the walls on the west and south sides, where the medina truly comes alive day and night.
  • Agdal Gardens: A vast historic orchard and reservoir complex attached to the southern walls and kasbah, illustrating the link between fortifications and royal estates.
  • Menara Gardens: Another historic garden and water basin aligned with the city's western gates, offering classic views towards the Atlas Mountains.
  • Marrakech Souks: The maze of markets tucked inside the walls, best accessed via gates like Bab Doukkala and Bab el-Khemis, where trading traditions echo the city's fortified past.


The Walls of Marrakesh appears in our Complete Guide to Visiting Marrakesh!

Moira & Andy
Moira & Andy

Hey! We're Moira & Andy. From hiking the Camino to trips around Europe in Bert our campervan — we've been traveling together since retirement in 2020!

Read our full story here

This website uses affiliate links which may earn a commission at no additional cost to you!

Planning Your Visit

Hours:

Accessible at all times, though exploring in daylight is recommended for safety and photography.

Price:

Free – walking along and around the walls and gates is part of the public streetscape.

Marrakesh: 2 km

Nearby Attractions

Similar Blogs