The Walls of Marrakesh are a set of defensive ramparts which enclose the historic medina districts of Marrakesh, Morocco. They were first laid out in the early 12th century by the Almoravid dynasty which founded the city in 1070 CE as their new capital. The walls have since been expanded several times by the addition of the Kasbah to the south at the end of the 12th century and by a later extension to encompass the northern neighbourhood around the Zawiya of Sidi Bel Abbes.
The Gates of Marrakesh were for the most part established since the original Almoravid construction of the city walls, but most have been modified during later periods. Other gates were also added when the Almohads created the Kasbah, which itself has been expanded and re-worked many times since.