Fortifications of Fez

[1] Finally, a more subtle or symbolic function of the city walls was to formally define the borders of the urban space, within which certain rules, principles, or regulations might apply.

[1] With the advent of gunpowder, the medieval walls became partly redundant as military defenses against other armies; however they remained essentially unchanged in the following centuries and were not rebuilt or redesigned to protect against artillery.

Only on one occasion was Fes taken by a foreign army: the Ottomans, with the help of a Wattasid dynasty survivor, occupied it in 1554 for less than a year before the Moroccan Saadis took it back.

[3] By contrast, local Bedouin or other potential raiders from the countryside were rarely equipped with artillery, so the existing walls were sufficient to defend against them.

The walls of Fès, like those of Marrakesh and most historic cities in Morocco, were generally built in rammed earth, an ancient building technique found across the Near East, Africa, and beyond.

[9] 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.

[7] 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.

[7][10] 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.

[3][1][11] However, due to Fes's continuing economic and military importance, the Almohad caliph Ya'qub al-Mansur ordered the reconstruction of the ramparts.

[12]: 36 [11]: 606  The walls were completed by his successor Muhammad al-Nasir in 1204,[12] giving them their definitive shape and establishing the perimeter of Fes el-Bali to this day.

[3][11][1] (Although according to another author, the reconstruction of the walls was ordered by Muhammad al-Nasir in 1212, following his defeat at Las Navas de Tolosa in Spain.

[3] Another district, initially known as Hims and later converted into the Jewish Mellah, was also added to the south of Bab Semmarine, between the city's inner and outer walls on this side.

[14] Today, an original section of these walls has been well-preserved between the Lalla Mina and Agdal Gardens, inside the perimeter of the Dar al-Makhzen.

[1][3] The extra fortification on this side has been interpreted has an indication that the royal city's defenses were as much about protecting the regime from the restive inhabitants of old Fes as they were aimed at warding off external invaders.

[1] Nonetheless, the Marinids did also restore and repair the walls of Fes el-Bali, in addition to devoting their attention to the construction of prestigious madrasas and other embellishments in the old city.

Today, Fes el-Jdid's walls and gates still date to a large extent from the Marinid period, generally from Abu Yusuf Ya'qub's initial construction.

[3] Upon retaking the city, the Saadi authorities took revenge upon some of the local leaders and treated the general population poorly, further enshrining the inhabitants' hostility to the new dynasty.

[3] Presumably as a result of this persisting tension, the Saadis built a number of new forts and bastions around the city which appear to be aimed at keeping control over the local population.

The term "kasbah" (Arabic: قَـصَـبَـة, romanized: qaṣabah) was used to denote a large number of fortified enclosures ranging from small garrison forts to larger citadels, many of them named after the ethnic or geographic origin of the soldiers posted there.

[16] The term borj (Arabic: برج), generally meaning "tower", was applied to a number of heavily fortified military structures and bastions, especially those of the Saadi era.

General example of rammed earth (pisé) wall being built (with metal instead of wooden scaffolding)
Restored (left) versus unrestored (right) section of pisé wall near Bab Guissa, in Fes el-Bali
Fes before 1069: the approximate outline of the dual cities of al-'Aliya and Madinat Fas, with their own walls (according to Lévi-Provençal). The river (not traced here) runs between them. The grey lines represent the outline of the walls today.
The northernmost sections of the city walls, believed to be the oldest remaining parts of the walls today
Bab Mahrouk , the Almohad -era western gate of the city
The walls of Fes under the Almohads (13th century) , after the unification of the two cities under the Almoravids (possible outline). The Almoravids established a kasbah on the west side of the city. The Almohads rebuilt the walls at the start of the 13th century and added a second kasbah, the Kasbah An-Nouar in the west.
Bab Dekkakin , originally the main northern entrance to Fes el-Jdid. The main structure dates from the Marinid period but the gate was modified and redecorated in the late 19th and early 20th centuries.
The walls of Fes el-Bali and Fes el-Jdid during the Marinid era (possible outline). Fes el-Jdid included Muslim neighbourhoods and eventually a Jewish neighbourhood (the Mellah ), as well as the Marinid palaces. The original layout of these palaces is no longer known. To the north, the Marinids also created a vast garden known as al-Mosara , enclosed with its own walls.
The fortress of Borj Nord , on the northern hills overlooking Fes el-Bali
The walls of Fes in the Saadi period (possible outline). The Saadis built multiple new fortresses in order to impose order and improve defenses. Borj Nord and Borj Sud were built outside the walls of Fes el-Bali on the hills to the north and south, respectively. The Kasbah Tamdert was built next to Bab Ftouh (south-east). Three main bastions were added to the defenses of Fes el-Jdid on the east and south sides: Borj Sheikh Ahmed, Borj Twil, and Borj Sidi Bou Nafa'. Several other less notable bastions were also added on the west side.
The entrance of the Kasbah Cherarda today
The walls of Fes circa 1913 , at the end of all the major 'Alawi-era additions. The final shape of the Dar al-Makhzen is known by this point, following many expansions. Moulay Rashid also added the Kasbah Cherarda north of Fes el-Jdid, Abd al-Rahman added the Bab Bou Jat Mechouar, while Hassan I finally linked Fes el-Jdid and Fes el-Bali with walls in the late 19th century. Moulay Hassan also created the Jnan Sbil and Agdal gardens, as well as the New Mechouar, next to which was the Dar al-Makina .
Map showing the names and locations of all the historic gates in Fes. (Note: some gates, such as Bab el-Hamra and Bab Khoukha, disappeared centuries ago, while other gates, such as Bab Chems and Bab Riafa, date from modern times.)