# Fortifications of the Maghreb

This article reviews the history of military architecture in the Maghreb (North Africa) under Islamic rule from the 7th century onward.

## Aghlabid and Fatimid fortifications

Some of the oldest surviving Islamic-era monuments in the Maghreb are military structures in Ifriqiya (around present-day Tunisia). The best-known examples are the Ribat of Sousse and the Ribat of Monastir, both dating generally from the Aghlabid period in the 9th century. A ribat was a type of residential fortress which was built to guard the early frontiers of Muslim territory in North Africa, including the coastline. They were built at intervals along the coastline so that they could signal each other from afar. Especially in later periods, ribats also served as a kind of spiritual retreat, and the examples in Sousse and Monastir both contained prayer rooms that acted as mosques. Also dating from the same period are the city walls of Sousse and Sfax, both made in stone and bearing similarities to earlier Byzantine-Roman walls in Africa.$^{:29–36}$$^{:25–27}$
After the Aghlabids came the Fatimids, who took over Ifriqiya in the early 10th century. Most notably, the Fatimids built a heavily-fortified new capital at Mahdia, located on a narrow peninsula extending from the coastline into the sea. The narrow land approach to the peninsula was protected by an extremely thick stone wall reinforced with square bastions and a round polygonal tower at either end where the wall met the sea. The only gate was the Skifa al-Kahla (Arabic: السقيفة الكحلة, romanized: al-saqifa al-kaḥla, lit. 'the dark vestibule'), defended by two flanking bastions and featuring a vaulted interior passage 44 meters long. (Although it's not clear today how much of the structure dates from the original Fatimid construction.) The peninsula's shoreline was also defended by a stone wall with towers at regular intervals, interrupted only by the entrance to a man-made harbor and arsenal.$^{:89–91}$$^{:47}$

## Zirid and Hammadid fortifications

The Hammadids, who started out as governors as governors of the Zirids (who were in turn governors for the Fatimids), also built a new fortified capital in Algeria known as Qal'at Bani Hammad in the 11th century, located on a strategic elevated site. Along with the earlier Zirid fortifications of Bougie and 'Achir, its walls were made mainly of rough stone or rubble stone, demonstrating a slow shift in construction methods away from earlier Byzantine-Roman methods and towards more characteristically North African and Berber architecture.$^{:92}$

## Almoravid and Almohad fortifications

Starting with the Almoravid and Almohad domination of the 11th–13th centuries, most medieval fortifications in the western Maghreb shared many characteristics with those of al-Andalus. Many Almoravid fortifications in Morocco were built in response to the threat of the Almohads. The archaeological site of Tasghimout, southeast of Marrakesh, and Amargu, northeast of Fes, provide evidence about some of these. Built out of rubble stone or rammed earth, they illustrate similarities with earlier Hammadid fortifications as well as an apparent need to build quickly during times of crisis.$^{:219–220}$$^{:299–300}$
City walls in Morocco were in turn generally built out of rammed earth and consisted of a wall topped by a walkway for soldiers, reinforced at regular intervals by square towers. These walls were characteristically crowned by merlons shaped like square blocks topped by pyramidal caps. Major examples of such fortifications can be seen in the walls of Marrakesh, the walls of Fes, and the walls of Rabat, all of which date essentially to the Almoravids or Almohads. In western Algeria, the walls of Tlemcen (formerly Tagrart) were likewise partly built by the Almoravids with a mix of rubble stone at the base and rammed earth above.$^{:220}$
As elsewhere, the gates were often the weakest points of a defensive wall and so were usually more heavily fortified than the surrounding wall. In Morocco, gates were typically designed with a bent entrance. They ranged from very plain in appearance to highly monumental and ornamental. Some of the most monumental gates still standing today were built in stone during the late 12th century by the Almohad caliph Ya'qub al-Mansur, including Bab Agnaou in Marrakesh and the Bab er-Rouah and Bab Oudaïa (or Bab el-Kbir) gates in Rabat.

## Marinid, Zayyanid, and Hafsid fortifications

After the Almohads, the Marinids followed in a similar tradition, again building mostly in rammed earth. Their most significant fortification system was the 13th-century double walls of Fes el-Jdid, their capital, but they also built a part of the walls of Salé (including Bab el-Mrissa gate), the walls of Chellah (which include a particularly ornate gate), the walls of Mansoura (near Tlemcen), and a part of the walls of Tlemcen.$^{:318–321}$
Further east, the Hafsids carried out important works on the walls of Tunis, their capital, once again making extensive use of rammed earth. Bab Jedid, the southwestern gate of the medina, dates from this period in 1276 and generally continues the Almohad format, including a bent entrance.$^{:323}$

## Early modern period (16th century and after)

In later centuries, Moroccan rulers continued to build traditional walls and fortifications while at the same time borrowing elements from European military architecture in the new gunpowder age, most likely through their encounters with the Portuguese and other European powers at this time. The Saadian bastions of Fes, such as Borj Nord, are one early example of these architectural innovations. As the defensive function of city walls and gates became less relevant in the modern era, city gates eventually became more ornamental and symbolic structures. A prominent example of this is the iconic Bab Bou Jeloud gate built by the French colonial administration in Fes in 1913.
The term "kasbah" (Arabic: القَـصَـبَـة; equivalent of Spanish Alcazaba) generally refers to a fortified enclosure, ranging from small garrison forts to vast walled districts that functioned as the citadel and center of government in a city (such as the Kasbah of Marrakesh or the Kasbah of Tangier). Sultan Moulay Isma'il (ruled 1672–1727), for example, built numerous kasbahs across the country which acted as garrison forts to maintain order and control, while also building a vast fortified kasbah in Meknes which acted as his imperial citadel containing his palaces.
"Kasbah", or tighremt in Amazigh, can also refer to various fortresses or fortified mansions in the Atlas Mountains and the desert oases regions of Morocco, such as the Kasbah Telouet, Kasbah Amridil, Kasbah Tamnougalt, or the Kasbah Taourirt in Ouarzazate. In these regions, often traditionally Amazigh (Berber) areas, kasbahs are again typically made of rammed earth and mud-brick (or sometimes stone) and are often marked by square corner towers, often decorated with geometric motifs along their upper walls and topped with sawtooth-shaped merlons.