The Gates of Marrakech
19 bab, 19 kilometres of ramparts — the fortified perimeter of the Red City
The ramparts of Marrakech run 19 kilometres around the medina. Built by the Almoravids in the 12th century and reinforced by every dynasty since, they are pisé — rammed earth mixed with lime and straw, baked by the sun into a surface harder than concrete. The distinctive pink-red colour comes from the local clay. The walls stand 8 to 10 metres high and are punctuated by 200 towers.
Bab Agnaou is the most beautiful. An Almohad gate from the 12th century, it is carved from Guéliz stone — blue-grey and fine-grained — with concentric horseshoe arches and an inscription from the Quran. It is the ceremonial entrance to the kasbah, the royal quarter. No gate in Morocco is more photographed.
Bab Doukkala faces west toward the Atlantic coast. It was the gate to Essaouira, Safi, and the port trade. The neighbourhood that grew around it — Bab Doukkala — still has the character of a commercial district. The mosque nearby is one of the largest in the medina.
Bab Debbagh opens east toward the tanneries. The name means Gate of the Tanners. Step through and you smell it before you see it — the tanning pits lie just inside the walls. This is the working gate, the trade entrance, the utilitarian passage that tourists rarely use.
Bab el-Khemis — the Thursday Gate — faces north. The name marks the weekly souk that was held outside it. Thursday markets still operate at several gates, preserving a rhythm established centuries ago: merchants arriving from the countryside, setting up outside the walls, trading until noon, and departing.
Bab Ighli, Bab er-Rob, Bab Ailen, Bab el-Makhzen — each name records a function, a direction, or a story. The gates are not decorative. They are the circulatory system of a city that was designed, from its founding in 1070, as a walled organism with controlled entry points.
Explore the full interactive module — with all 19 gates mapped, architectural details, and the historical routes each gate commanded — at Dancing with Lions: https://www.dancingwiththelions.com/data/gates-of-marrakech
Interactive Module
Data and visualisation by Dancing with Lions





