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.
See also: History of Marrakesh.
Marrakesh was founded in 1070 by Abu Bakr ibn Umar, the early leader of the Almoravids.[1] At first, the city's only major fortification was the Ksar al-Hajjar ("Palace/Fortress of Stone"), a royal citadel built by Abu Bakr to protect the treasury. It was located right next to the site of the current Kutubiyya Mosque in the western part of the city. Like other kasbahs of its time, it probably occupied a quadrangular area and is assumed to have had multiple gates (of which the western gate may have roughly corresponded to the later Bab al-Makhzen gate in the city walls). Excavations in the 20th-century revealed that the citadel's southern side was 218 metres long, indicating a fairly large structure. It was the first monumental structure built by the Almoravids and marked their definitive transition from a nomadic Saharan people to an empire with a fixed base.
It was only in 1126 that Ali ibn Yusuf, a later Almoravid amir, decided to surround the city with a full circuit of walls, which were completed in January or February 1127. The decision to fortify the city with ramparts was likely due to rising threat of the Almohads at the time.[2] Abu-l-Walid ibn Rushd, a qadi from Cordoba and the grandfather of the famous Ibn Rushd (Averroes), was reportedly the one who convinced the amir to undertake the construction. Historical sources also claim that construction took only 8 months and cost 70,000 gold dinars. Prior to construction, the path of the walls was laid out with ropes and the amir's astrologers were consulted for the most propitious date on which to start.
The main outline of the medina's walls today is still broadly that of the original Almoravid walls, although with notable differences to the north and south. The resulting walled area formed an irregular polygon of vaguely quadrangular shape. Some of the irregularities in this outline may have been due to existing cemeteries and religious sites or to last-minute decisions to include more land within the walls. Many of the city's main gates also date back to this period—at least in their locations if not necessarily in their current forms and names. These gates were, in clockwise order starting from the northeast: Bab Fes (later known as Bab el-Khemis), Bab Debbagh, Bab Aylan, Bab Aghmat, Bab Yintan, Bab as-Saliha, Bab Neffis (probably the predecessor of Bab er-Robb today), Bab ash-Shari'a, Bab al-Makhzen, Bab el-'Arissa (also known as Bab ar-Raha), Bab Doukkala, Bab Moussoufa, and Bab Taghzout.[3] Four of these gates—Bab ash-Shari'a, Bab Moussoufa, Bab Yintan, and Bab as-Saliha—disappeared some time ago and are only known from historical texts or from vestigial physical evidence.
When the Almohad ruler Abd al-Mu'min conquered Marrakesh in 1147 he reportedly destroyed many Almoravid monuments (especially mosques) but the Ksar el-Hajjar and the palace of Ali ibn Yusuf were still used as the official residence of the new Almohad rulers for a time. The Almohad caliph Ya'qub al-Mansur (ruled 1184–1199), however, embarked on an ambitious construction project to create a vast new royal district, the Kasbah, attached to the south side of the city. Its creation was motivated in part by the rapid growth of the city's population and an urgent need for more space within the city.[4] However it may also have been motivated by the Almohad caliph's desire to follow the example of other powerful Islamic rulers who built separate palace-cities from which to rule, such as the Umayyad construction of Madinat al-Zahra near Cordoba or the Abbasid construction of Samarra in Iraq. Construction of the kasbah began in 1185 and finished by 1190.
The current western and southern outline of the kasbah today, including its walls, most likely still date back essentially to the Almohad construction. The kasbah's main gate was Bab Agnaou: both a defensive and a ceremonial gateway, located just inside the city walls near Bab er-Robb (Bab Neffis) and forming the main public access to the kasbah for the city's residents.[5] The Almohads also established vast gardens and orchards near the kasbah, in particular the al-Buhayra garden now known as the Agdal Gardens. These were located further and were enclosed by their own separate walls.[6] [7]
Following the demise of the Almohad regime, Marrakesh as a whole fell into decline. The following Marinid dynasty made Fes their capital and carried out few major constructions in Marrakesh. It was not until the Saadian dynasty (16th century to early 17th century) established Marrakesh as their capital that the city saw a resurgence.[8] The Saadians renovated the kasbah and expanded its northern outline slightly with new palaces such as El Badi. Sultan Moulay Abdallah al-Ghalib also transferred the Jewish population of the city to a new Mellah district on the east side of the Royal Palace, expanding the eastern outline of the kasbah in the process. Sultan Ahmad al-Mansur also renovated and replanted the Agdal Gardens, thus maintaining this large walled enclosure to the south of the city.
The Saadians, and their successors the Alaouites, also sponsored the construction and expansion of the zawiya and mosque complex around the mausoleum of Sidi Bel Abbes, which was located just outside the northern gate of the city, Bab Taghzout. Sidi Bel Abbes is often considered the patron saint of Marrakesh[9] and his zawiya attracted more and more settlers to the area until a flourishing neighbourhood developed here outside the walls of the city. In the 18th century, under the reign of the Alaouite sultan Muhammad ibn Abdallah, the walls of the city were finally extended to encompass this neighbourhood, forming the new northern point of the city. In the same period, the sultan also extended the Kasbah southwards and extended the Agdal northwards, until the walls of both enclosures were joined.[6] [7] This constituted the last major extension and modification of the city walls.
Other works by Alaouite sultans still added to the existing walls and gates of the city. Sultan Muhammad ibn Abdallah is also responsible for much of the construction and redevelopment of the royal palace (Dar al-Makhzen) following years of neglect, giving it more or less its present-day form. The southern side of the Kasbah was expanded to accommodate new gardens, new neighbourhoods for palace servants and troops, and a series of walled squares known as mechouars (an official square/courtyard at the entrance of a royal palace). A multitude of gates were built to regulate passage between these new southern annexes. Many of them are of minor architectural interest, though Bab Ahmar (the easternmost gate) has a unique design that includes an elevated platform for light artillery. Lastly, following its destruction by the Rehamna in 1862, the western wall of the Agdal Gardens was rebuilt by Sultan Muhammad ibn Abd al-Rahman. At the same time, the sultan added a fort called Sqallat al-Mrabit to defend this part of the ramparts.
Following the 2023 Marrakesh-Safi earthquake on 8 September, portions of the city walls collapsed.[10]
The walls have a fairly regular construction typical of medieval Morocco and al-Andalus, standing between 6 and 8 meters in height and fortified every 25 to 30 meters by square towers or bastions. The walls vary between 1.4 and 2 meters in thickness, while the towers vary in thickness between 8 and 14 meters.[11] Originally the walls were topped by a narrow path (wall walk) which was protected by battlements with merlons, though many of these have since disappeared. There is evidence that the walls were originally surrounded by a ditch or moat, though this may not have played a significant defensive role.
The walls of Marrakesh, like those of Fes and most historic cities in Morocco, were built in rammed earth, an ancient building technique found across the Near East, Africa, and beyond.[12] [13] [14] It is also known as "pisé" (from French) or "tabia" (from Arabic).[15] It generally made use of local materials and was widely used thanks to its low cost and relative efficiency. This material consisted of mud and soil of varying consistency (everything from smooth clay to rocky soil) usually mixed with other materials such as straw or lime to aid adhesion. The addition of lime also made the walls harder and more resistant overall, although this varied locally as some areas had soil which hardened well on its own while others did not. For example, the walls of Marrakesh are composed of up to 17% lime, while those of Fes and nearby Meknes contain up to 47%.[16] The technique is still in use today, though the composition and ratio of these materials has continued to change over time as some materials (like clay) have become relatively more costly than others (like gravel).[17]
Rammed earth walls were built from bottom to top one level at a time. Workers pressed and packed in the materials into sections ranging from 50 and 70 cm in length that were each held together temporarily by wooden boards. Once the material was settled, the wooden restraints could be removed and the process was repeated on top of the previously completed level. This process of initial wooden scaffolding often leaves traces in the form of multiple rows of little holes visible across the face of the walls. In many cases walls were covered with a coating of lime, stucco, or other material to give them a smooth surface and to better protect the main structure.
This type of construction required consistent maintenance and upkeep, as the materials are relatively permeable and are more easily eroded by rain over time; in parts of Morocco, (especially near the Sahara) kasbahs and other structures made with a less durable composition (typically lacking lime) can begin to crumble apart in less than a couple of decades after they've been abandoned.[18] As such, old structures of this type remain intact only insofar as they are continuously restored; some stretches of wall today appear brand new due to regular maintenance, while others are crumbling.
Aside from those of the Kasbah, the city's main gates all date back to the Almoravid period when the city walls were first built, but most of them have undergone subsequent modifications in later periods. Many of the medieval gates had complex "bent entrances" designed for greater defensiveness. Nowadays, simple archways have been opened alongside many of them to allow for easier passage in and out of the medina, along with other gaps in the city walls created to accommodate new roads.
The following are the main historical gates of the medina (the main walled city; not counting the Kasbah to the south). The gates are described below in order, starting from the northeast corner of the medina and proceeding in a clockwise fashion.
See main article: Bab el-Khemis (Marrakesh). This gate is located in the northern/northeastern corner of the city walls and dates back to the Almoravid period. It was originally known as Bab Fes ("Gate of Fes"), but this name was apparently lost during the Marinid era. The gate's current name (el-Khemis) refers to the souk or open-air market which historically took place here every Thursday (al-Khamis in Arabic). Nowadays, the market continues almost all week right outside the gate, while a permanent flea market, Souk al-Khemis, has been constructed a few hundred meters to the north.[19] [20] Also just outside the gate is a qubba (domed mausoleum) housing the tomb of a local marabout or Muslim saint.
The gate's outer entrance is flanked on either side by square bastions. The gate's passage originally consisted of a bent entrance which effected a single 90-degree turn; one entered the gate from the north and then exited westwards into the city. According to legend, the door leaves of the gate were brought from Spain by a victorious Yusuf ibn Tashfin. During the Almohad period, the gatehouse was expanded such that its passage effected three more right-angle turns before exiting southwards. This gave it a similar form and layout to several other major Almohad gates such as Bab er-Rouah. The outline of the gate's original exit, now walled-up, can still be seen in its interior western wall. The gate underwent a significant renovation in 1803–04 on the orders of Sultan Moulay Slimane, noted by a marble inscription found inside. At some point in the 20th century, the inner wall of the passage was opened up to allow a straight passage directly through the gate to facilitate the heavy traffic in the area, resulting in the current form of the gate.
See main article: Bab ad-Debbagh. Bab ad-Debbagh (or simply Bab Debbagh) is the northernmost of the two eastern gates of the city, dating back to the Almoravid period. Its name means "Gate of the Tanners" and refers to the nearby tanneries which have been present here since the Almoravid period. It has the most complicated layout of any gate: its passage bends 5 times, in an almost S-like path, passing through two open-air courts and one covered chamber. A staircase in the southeastern corner of the structure grants access to the roof of the gate. Scholars believe, however, that only the central part of the gate (the vaulted chamber) dates back to the original Almoravid gate and that the Almohads added the inner and outer courtyard sections. The gate thus originally would have had a "simple" bent entrance (i.e. it turned 90-degrees only once).
Bab Aylan is the other (southernmost) eastern gate of the city, south of Bab Debbagh. It is named after the Aylan tribe (pronounced Haylana in Arabic), which was part of the Berber Masmuda confederacy. The gate was the site of the Battle of al-Buhayra in 1130 in which the Almoravids defeated an assault by the Almohads. (The battle was named after a garden, Buhayrat al-Raka'ik, which was located here near the eastern gates of the city.[21]) The original Almoravid gate had a simple bent passage (i.e. turning 90-degrees once) located within a bastion on the outer side of the ramparts. Some time after the Almoravid period another bent passage was added on the inner side of the gate, such that one enters the gate from the south, turns twice (first left, then right), and emerges into the city facing north.
See main article: Bab Aghmat. This gate was named after Aghmat, the early capital of the Almoravids before Marrakesh, which lay in this direction (i.e. to the south/southeast). The gate may have also been called Bab Yintan, though this is uncertain and this name may have referred to another nearby gate which has since disappeared. Like other Almoravid gates of the city, it has been significantly modified since its initial construction. Originally, it most likely consisted of a bent passage which effected a full 180-degree turn, forming a symmetrical structure around the axis of the wall: one entered from the west through a bastion on the outer side of the city wall, passing through a roofed vestibule, then exited westwards from the bastion on the inner side of the wall, passing through an open-air court. In a much later period a walled courtyard with a very different construction style was added on the outer end of the gate, forcing traffic to effect one more 180-degree turn (though in recent times the northern wall of this courtyard has been knocked down to allow a more direct passage). A staircase in the northeastern corner of the gatehouse leads to the roof. A major cemetery, the Bab Aghmat Cemetery, occupies a wide area just outside the gate.[22]
See main article: Bab er Robb. Bab er-Robb is one of the most unusual gates in the city, and the only one to be located in an angle or corner of the walls. While historians Deverdun and Allain believes the gate to be of Almohad origin (specifically under Ya'qub al-Mansur) due to its location relative to the Almohad Kasbah, historian Quentin Wilbaux more recently argued that its location in the wider schema of the city suggests it was an original Almoravid gate. All of them believe that Bab Neffis, another gate described in historical sources and named after the nearby Neffis (or N'fis) River, was most likely another name for the same gate. The word Robb or Rubb refers to a type of cooked wine whose vineyards were cultivated along the Neffis River and thus imported and regulated through this gate. A water basin measuring approximately 70 by 40 metres once existed outside this gate, in an area now covered by a cemetery, and was used for swimming practice.The main structure of the gate is a bastion inside which a bent passage enters from the north, performs a 180-degree turn, and then exits again to the north. Today, the walls in the area have been moved around the gate's bastion such that both entrances of the gate, facing north, open inside the city walls, obscuring its original role as an entrance to the city. However, when the gate was studied by French scholars in 1912 the surrounding city wall had a different configuration: rather than attaching to the side of the gatehouse it attached to the middle of the gate's northern facade, between its two doorways, such that the eastern doorway was outside the city wall while the western one was inside the walls. Since both entrances still faced north, this meant that the outer entrance was not actually directly visible to outsiders coming from the countryside because it faced back towards the city walls; as a result, travelers arriving from the south had to walk all the way around to the far side of the bastion and enter it from the north. Because of this uncharacteristic configuration, and based on comparisons with other gates of the city, Wilbaux has hypothesized that the city's ramparts in this area were previously altered and moved around the gate such that the entrances were originally reversed: the eastern doorway, which was the outer entrance in 1912, was originally located inside the city walls, while the western doorway (the inner entrance in 1912) was originally outside the city walls. This way, the bastion of the gate straddled the city wall and its design was thus quite similar to the original configuration of Bab Aghmat, the other southern gate of the city.
Bab al-Makhzen is one of the western gates of the city, located west of the Kutubiyya Mosque. It dates back to the Almoravid period. It was probably named after the palace (Dar al-Makhzen) which existed near here in the Almoravid period as part of the former Ksar el-Hajjar. The gate is flanked by octagonal towers and has been much modified. It originally had a simple bent passage (turning 90 degrees to the north) but the gatehouse has since disappeared and only a simple arched opening remains today. At the beginning of the 20th century the gate was walled-up and closed, but today a road passes through it.
Bab al-'Arisa (meaning "Gate of the Bride"; also spelled as Bab Larissa or Bab Lrissa) is also known as Bab al-'Arais ("Gate of the Fiancés") and formerly as Bab ar-Raha (Raha possibly meaning "abundance" or "well-being"; it is also a surname in Marrakesh). It is the other western gate of the city, located north of Bab el-Makhzen in an angle of the ramparts, and dates back to the Almoravid period. Like Bab al-Makhzen to the south, the gate is flanked by octagonal towers and originally had a simple bent passage (turning 90 degrees to the north), but has since been modified. It was walled-up at the beginning of the 20th century but today it has a simple opening through which a local road passes.
See main article: Bab Doukkala.
Bab Doukkala is the northwestern gate of the medina. Its name, Doukkala, was that of both a Berber tribe and of a region between Marrakesh and Casablanca today. The gate is also of Almoravid construction, but unlike many others it has not been subject to major modifications (at least in its floor plan) and retains its original sophisticated bent entrance design. The passage inside the gate bends at a straight angle twice: one enters from the west, turns south, then turns east before emerging into the city. Today the gate is flanked by other simple openings in the wall to allow for easy circulation.
A few other gates, mainly from recent centuries, can be found around the city and have their own names, in addition to a number of non-notable openings in the walls which have been created to improve free movement in and out of the medina. These include:
At least four more gates, possibly five (depending on the status of Bab Yintan) formerly existed along the perimeter of the medina's city walls but have since disappeared or been rendered obsolete. They are listed here.
Dating to the Almoravid period, this was originally the northern gate of the city until Sultan Muhammad ibn Abdallah extended the city walls to encompass the northern neighbourhood of Sidi Bel Abbes in the 18th century. The gate's name, Taghzout, is of unclear historical origin but is a common Berber toponym with a few different meanings; it may have referred to a nearby village or to the valley of the Tensift River. The gate is also called Bab Sidi Bel Abbes (after the nearby shrine). The gate resembled the nearby Bab el-Khemis in its original configuration: it was flanked by two square bastions and had a bent entrance by which one entered from the north and exited to the west. Today, however, the gate has lost its bastions and its bent passage and all that remains is a large archway over the main street to the south of the Zawiya of Sidi Bel Abbes.
Bab Moussoufa (or Bab Massufa) is an Almoravid gate whose history is uncertain but whose location is hypothesized to have been in the northwest corner of the city, north of Bab Doukkala and west of Bab Taghzout, near the neighbourhood of Riyad al-'Arus. Its name comes from an Almoravid Berber tribe.
Bab ash-Shari'a, meaning the "Gate of Justice/Law" (Shari'a), was the main southwestern gate of the city, dating back to the Almoravid period. It was located near an angle of the walls just west of Bab er-Robb. The gate was rebuilt in the Almohad period when Abu Ya'qub Yusuf ordered his son, Ya'qub (the future al-Mansur), to move this section of the wall further south to accommodate a new neighbourhood for the city's growing population. This work was carried out over August and September 1183 and a new Bab ash-Shari'a gate was inaugurated by Abu Ya'qub Yusuf. The location of this gate has since been blocked and occupied by the mausoleum of Imam as-Suhayli (one of the Seven Saints of Marrakesh), though remains of the gate can be seen next to the mausoleum.
A large open-air prayer area, called a musalla or msalla, was located just outside the gate during the Almoravid and Almohad era (though it may have been moved during the construction of the Kasbah). Also near here was a hippodrome for equestrian games and training, equipped with a pavilion from which the amir or caliph could observe the activities. Today this area is occupied by a large cemetery stretching out from Bab er-Robb.
This was one of the southern gates of the Almoravid city, named after the Saliha gardens south of the city. It was located where the Almohad Kasbah district was later created; which is when the gate likely disappeared.
Scholars are uncertain about the identity and location of this gate. It may have been a southern gate of the city, possibly near what later became the Jewish Mellah on the east side of the Kasbah, but it has since disappeared without any clear trace. Another possibility is that it was simply another name for Bab Aylan or, more likely, Bab Aghmat. French historian Gaston Deverdun, in particular, favoured this second hypothesis.
The earliest gates of the Kasbah date to the Almohad period, but a number of gates date from the various expansions of the kasbah and the royal palace (Dar al-Makhzen) in later centuries.
See main article: Bab Agnaou. Bab Agnaou, one of Marrakesh's most famous and beautiful gates, was the main public and ceremonial entrance to the Kasbah of the city. The name agnaou is believed to be of Berber origin and had multiple historically reported meanings including "mutes" and, later on, "Black people" (or the Gnawa); however, it is unclear what exact connotation the name had in this case. The gate was also called Bab al-Qasr ("Gate of the Palace") and Bab al-Kuhl ("Gate of Kohl"). Its construction is attributed to Ya'qub al-Mansur (the founder of the Kasbah) in 1188.
It is located just inside the walls of the medina, near Bab er-Robb. The gate was originally flanked by two bastion towers and the passage inside was a bent entrance (meaning it turned 90 degrees before exiting) passing through a large vaulted vestibule. On top of the gate was a terrace reached by an interior staircase. This layout made it similar to other monumental Almohad gates such as Bab er-Rouah in Rabat. The flanking towers and the covered vestibule, however, have since disappeared, and the archway of the gate has been partly filled-in with a smaller brick arch. Nonetheless, the gate has preserved its rich stone-carved decoration from the Almohad period, again comparable to that of Bab er-Rouah and of Bab Oudaia in Rabat.
Bab Berrima (also spelled Bab Barrima) is a gate between the main city (the medina) and the northeast part of the Kasbah, at the south end of Place des Ferblantiers today. It has existed since the Saadian period. Its creation may have been needed to allow workers to come and go during construction of the Badi Palace, which is located nearby. The gate consists of a simple arched passage cut through a tower in the perimeter wall of the Kasbah. The tower was once crowned with sawtooth-shaped merlons from the Saadian era, but these have since disappeared. The gate is flanked by rows of boutiques which are more recent constructions.
This gate is located at the northeastern corner of the current Royal Palace (inside the perimeter of the Kasbah). It was built on the orders of Sultan Moulay Hassan (ruled 1873–1894) to facilitate access to the palace at this end. It is named after the qadi who was in charge of its construction.
See main article: Bab Ksiba. Bab Ksiba (or Bab Qusayba) is a small western gate to the Kasbah district. It used to be the entrance to another small kasbah (qusayba) which was adjoined to the main kasbah in this area to protect the western side of the Grand Mechouar (a vast open square, still present today, at the entrance of the royal palace) and the Derb Chtouka neighbourhood. The date of its construction is unclear; it existed at the beginning of the 19th century and may have been built under Muhammad ibn Abdallah in the 18th century, but was almost certainly not part of the original Almohad kasbah.
Under Muhammad ibn Abdallah (governor of Marrakesh after 1746, sultan 1757–1790), the Royal Palace (Dar al-Makhzen) in the Kasbah was renovated and expanded. This expansion mainly progressed southwards, where the sultan built a number of mechouars (official squares at the entrance to the Royal Palace where royal ceremonies and receptions could take place). These occupy a large space between the palace to the north and the Agdal Gardens to the south. The mechouars are accessed through a number of gates with their own unique names; although many of the gates are of minor historical or architectural interest. Roughly from east to west, these gates are:
A number of gates existed in the original Almohad kasbah which have disappeared today but are known from historical sources. In particular, the kasbah had a number of inner gates which granted passage between its three main districts, as well as few outer gates aside from Bab Agnaou. They included: