The Marrakech city walls are a 19-kilometer circuit of red earth fortifications built in the 1120s to protect the medina. These ramparts remain largely intact, standing up to 9 meters high and featuring 20 distinct gates that once served as the only entry points to the imperial capital.
Constructed primarily from pisé, a traditional mixture of red clay and lime, the walls derive their iconic ochre hue from the local soil of the Haouz plains. This material is surprisingly durable, yet it requires constant maintenance to prevent erosion from the dry desert winds. Because the clay is packed into wooden molds during construction, the walls are consistently two meters thick, providing a formidable barrier that successfully defended the city for centuries.
Walking the perimeter is a lesson in medieval engineering and urban survival. The northern stretches near the bus station tend to be loud and polluted, making them less ideal for a casual stroll. If you want a quieter experience, the southern sections near the Royal Palace offer a more tranquil atmosphere where the scale of the fortifications is easier to appreciate without the constant roar of motorbikes.
Visitors often notice thousands of small, square holes regularized across the face of the ramparts. These are not damage from cannon fire or nesting spots for birds, though many local guides tell such stories to entertain tourists. These openings are actually scaffolding holes, known in old French as échappées d'âge, used by workmen to insert wooden support beams during construction and subsequent repairs. Since pisé needs regular patching with fresh clay, these holes remain open today to facilitate the rapid assembly of ladders and platforms whenever a section begins to crumble.
The wall is not a simple flat surface; it is reinforced by approximately 202 rectangular watchtowers spaced at regular intervals. These towers allowed archers and guards to maintain a clear line of sight along the base of the wall, eliminating blind spots where enemies might attempt to scale the barrier. During the Almoravid era, the gates were strictly locked every night, a practice that continued well into the early 20th century to protect the inhabitants from raiding tribes and internal unrest.
Bab Agnaou is arguably the most significant of the 20 gates because it served as the ceremonial entrance to the royal Kasbah district. Unlike the majority of the ramparts which are made of simple mud-brick and clay, this 12th-century gate was constructed using bluish-grey sandstone from the nearby Gueliz area. Over the decades, the stone has weathered into a deep reddish-brown that blends with the rest of the city, but its intricate carvings of Quranic verses in Kufic script remain visible. You should look for the large stork nests that almost always crown the top of this gate; these birds are considered protected residents of the city.
Located close to Bab Agnaou, Bab Er Robb has a more functional and slightly more colorful history related to commerce. The name translates to the Gate of Grape Juice, a reference to a period when the entry of alcoholic beverages into the city was strictly controlled at this specific checkpoint. It remains a massive, imposing structure of unadorned clay, representing the raw aesthetic of the original Almoravid defensive style. This area serves as a major transit hub today, so expect a lot of local foot traffic and taxis if you choose to photograph this section.
A calèche ride around the entire circuit of the ramparts is a classic Marrakech experience that usually takes about 90 minutes. You can find these green horse-drawn carriages lined up near Jemaa el-Fnaa or the Koutoubia Mosque. While drivers may initially quote 500 MAD for a tour, a fair negotiated price is typically between 150 and 250 MAD depending on the length of the route. It is vital to agree on the final price and the specific route before you step into the carriage to avoid any misunderstandings regarding the duration of the trip.
The red clay of the walls undergoes a dramatic color shift during the golden hour, turning from a dusty pink to a glowing orange. The stretch of wall between Bab Ksiba and Bab Agnaou is particularly photogenic because the setting sun hits the facade directly without being blocked by modern high-rise buildings. For a higher perspective, several rooftop cafes near the tanneries at Bab Debbagh allow you to look down on the ramparts and the interior courtyards of the medina simultaneously. Fees for the walls themselves do not exist as they are a public structure, so you can explore most sections at no cost.
No public walkway exists on top of the ramparts for safety and security reasons. However, certain riads and cafes built against the wall offer terrace views that allow you to see the thickness of the structure and the defensive walkway from above.
These are scaffolding holes used by builders to insert wooden supports during the construction and repair of the pisé earth. They are kept open today so that maintenance crews can easily erect scaffolding whenever the clay needs to be patched.
A standard tour of the ramparts by calèche generally costs between 150 and 300 MAD after negotiation. This price covers the entire group in the carriage, not per person, and the ride typically lasts around one to two hours.
Bab Agnaou is the most visually impressive gate because of its ornate 12th-century stone carvings and massive horseshoe arch. It is located in the southern medina and provides the best backdrop for photography due to its unique bluish-red sandstone texture.
The initial fortification was built between 1122 and 1126 under the Almoravid ruler Ali ibn Yusuf. The project was completed in a remarkably short period to defend the city against the rising threat of the Almohad movement.
Sven Wonderful place 🙏
M.G.G Biurrun The Marrakesh wall is one of the largest and best preserved in Morocco. It is a medieval construction, from the 12th century, with later additions surrounding the kasbah, its function was to defend the old urban center of Marrakech. It has 19 access doors, the most spectacular being the Bab Agnaou, a monument in itself due to its decoration that remains almost intact.
shelly Quiet place to walk through.
Mohammed EL Mokhtar LAHLOU Wonderfel
Nikolas Belalis One of the gates to the old town. This part of the walls is in good condition.