Fortifications of Fez

The Fortifications of Fez (also spelled Fes) comprise a complex circuit of ramparts and gates surrounding Fes el-Bali and Fes el-Jdid, two urban agglomerations that compose the old "medina" of Fes, Morocco. They also include a number of kasbahs (citadels) and forts which were built both to protect and to control the city. These fortifications have been built up over many centuries and the extensive remnants today date from many different periods.

The city walls underwent a complex evolution over the centuries with multiple phases of expansion, destruction, and reconstruction affecting different parts of the city's outline. Likewise, the city gates vary greatly in design and date, ranging from heavily fortified defensive gates to simple openings in the walls today. The walls marked both the physical and symbolic limits of the city (and sometimes also of its subdivisions), and as such the gates themselves could acquire added social or political significance. The city's major cemeteries are also located just outside the main gates, in particular: Bab Ftouh, Bab Mahrouk, and Bab Guissa.

Role of the city walls
As with other pre-modern city walls, the ramparts of Fes served both a defensive and a controlling function. They protected the city from attack and kept out strangers. City gates were typically closed and locked at night; travelers would not generally have been able to enter the city at a late hour. The walls and gates also controlled the comings and goings of the city's own inhabitants, preventing anyone from leaving if the authorities desired. One of their most important functions in controlling access was to control the flow of goods and to ensure they were properly taxed. This ensured the efficient collection of revenues on behalf of the authorities (keeping in mind that all the important souqs (markets) were within the city). 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.

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. This is partly because Fes was a central inland city and rarely faced external threats from armies equipped with such weapons, unlike the Atlantic coastal cities of Morocco which were frequently threatened or occupied by Portuguese and Spanish forces. 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. The Saadis later built the only fortresses in Fes designed to resist gunpowder technology, and even these seem to have been intended more to impose Saadi control on the often rebellious city. 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 continued to play their more administrative functions. The city gates accordingly came to be seen as more formal and decorative in purpose, sometimes serving as monumental entries to the city; the 20th-century construction of the strictly ornamental gate of Bab Bou Jeloud by the French colonial administration can be seen as the logical outcome of this shift in purpose.

Constructions methods and maintenance
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. It is also known as "pisé" (from French) or "tabia" (from Arabic). 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 Fes and nearby Meknes contain up to 47% lime versus around 17% in Marrakesh and 12% in Rabat. ) 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). The 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. 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.

Early history of Fes: dual cities
The exact details of the foundation of Fes are debated by modern scholars, based on sometimes conflicting historical sources. Though the dates vary slightly, all accounts agree that Idris I founded the first urban settlement, Madinat Fas, on the eastern shore of the Oued Fes (Fes River; now also called Oued Bou Khrareb) while his son Idris II founded a second settlement, al-'Aliya, on the western shore. Historical sources agree that these two early cities had their own walls, their own separate mosques and institutions, and were often rivals. This urban center nonetheless served as the Idrisid capital and remained one of the main cities of Morocco even after the decline of the Idrisids.

Almoravid and Almohad era: the unification of the two cities
In 1069, the Almoravid emir Yusuf ibn Tashfin ordered the walls of the two cities to be demolished and for a new wall to be built around both cities, thus unifying them for the first time. Although the Almoravids made their capital at Marrakesh, Fes was one of their most important cities. They constructed a fortified kasbah (citadel) in the eastern end of the city, likely on the same site as the later Kasbah Bou Jeloud. In 1145 the Almohad leader Abd al-Mu'min besieged and conquered the city during the Almohad overthrow of the Almoravids. Due to the ferocious resistance they encountered from the local population, the Almohads demolished the city's fortifications. However, due to Fes's continuing economic and military importance, the Almohad caliph Ya'qub al-Mansur ordered the reconstruction of the ramparts. The walls were completed by his successor Muhammad al-Nasir in 1204, giving them their definitive shape and establishing the perimeter of Fes el-Bali to this day. (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. ) Many of the main gates of the city were built around this time. Since the city had grown in the meantime, the new Almohad perimeter of walls was larger than that of the former Almoravid ramparts. Like other Moroccan ramparts, it was built in rammed earth with stone foundations, and was reinforced with rectangular towers. The Almohads also built the Kasbah Bou Jeloud on the site of the former Almoravid kasbah in the western end of the city (just west of Bab Bou Jeloud today), and also built the initial kasbah occupying the site of the current Kasbah an-Nouar. Not all the land within the city walls was densely inhabited; much of it was still relatively open and was occupied by crops and gardens used by the inhabitants.

Today, the northern sections of Fes el-Bali's city walls are believed to be the oldest remaining parts of the walls of Fes and are thought to date all the way back to this Almohad period. The fortified city gates of Bab Mahrouk and Bab Guissa also retain their forms from the Almohad period.

Marinid era: the creation of Fes el-Jdid
In 1248, Fes was in turn conquered by the Marinids under Abu Yahya, expelling the Almohads. In 1250, however, while the sultan was out on campaign, the inhabitants of Fes rebelled and the city had to be reconquered after a 9-month siege. Perhaps due to this recurring streak of rebellion and resistance, the Marinid sultan Abu Yusuf Ya'qub decided, in 1276, to build an entirely new royal city to the west of the old city, on higher ground overlooking it. This became known as Fes el-Jdid ("New Fes"), and included the royal palace of the sultans (Dar al-Makhzen), the administrative quarters of the state, and the headquarters of the army. Fes el-Jdid had its own set of fortified walls and gates. Its northern entrance, at the beginning of the road to Meknes, consisted of a fortified bridge (now the Old Mechouar) over the Oued Fes. This bridge was set between two gates: Bab es-Sebaa (the current Bab Dekkakin) and Bab el-Qantara (or Bab el-Oued; now replaced by the gate of the Dar al-Makhzen). The southern gate of the city, Bab 'Oyun Sanhaja (later Bab Semmarine), and the western gate, Bab Agdal, all shared a similar defensive layout with Bab es-Sebaa by having a bent entrance and flanking towers. Inside, the city was further subdivided into different districts, some of which, including the Dar al-Makhzen, had walls and gates separating them from the others. 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.

Most of Fes el-Jdid's outer perimeter was protected by a set of double walls; a tall inner wall with heavy square towers at regular intervals and a smaller outer wall with minor towers. 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. On the city's north side, the smaller outer wall appears to have actually extended outwards from the city in order to enclose the vast Mosara Garden, a royal pleasure garden created by the Marinids in 1287, nearly as large as the city itself. The raised aqueduct which provided water to this garden ran between Bab Dekkakin and the gate of Bab Segma to the north (composed of two massive octagonal towers still seen today), and was later incorporated into the much more recent walls of the New Mechouar.

The eastern perimeter of Fes el-Jdid, facing Fes el-Bali, was more heavily fortified: both the inner and outer walls were equally massive, and between them ran a long military corridor for troop movements. 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. 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. The heyday of the Marinids thus translated also into a golden age for Fes as well.

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. However, some sections have been expanded over the years, with those of the Dar al-Makhzen, in particular, being extended multiple times to accommodate new gardens and extensions of the palace.

Saadi era: controlling Fes


Following the decline of the Marinids and their Wattasid successors, Fes in turn entered a period of relative darkness. The Saadi sultan Muhammad ash-Sheikh besieged and conquered Fes in 1549, after strong resistance. In 1554-55 a surviving member of the Wattasid dynasty reestablished control over Fes and the Saadis were forced to once again besiege and reconquer Fes right away. 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. 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. They were mostly located on higher ground overlooking Fes el-Bali, from which they would have been easily able to bombard the city with canons. These include the Kasbah Tamdert, just inside the city walls near Bab Ftouh, and the forts of Borj Nord (Borj al-Shamali) on the hills to the north, Borj Sud (Borj al-Janoub) on the hills to the south, and the Borj Sheikh Ahmed to the west, at a point in Fes el-Jdid's walls that was closest to Fes el-Bali. These were built in the late 16th century, mostly by Sultan Ahmad al-Mansur. Two other bastions, Borj Twil and Borj Sidi Bou Nafa', were also built along Fes el-Jdid's walls south of Borj Sheikh Ahmed. The Borj Nord, Borj Sud, and these bastions (sometimes referred to as the bastioun in Arabic) of Fes el-Jdid are the only fortifications in Fes to demonstrate clear European (most likely Portuguese) influence in their design, updated to serve as defenses in the age of gunpowder. Some of them may have been built with the help of Christian European prisoners of war from the Saadis' victory over Portuguese at the Battle of the Three Kings in 1578.

'Alawi era: linking Fes el-Jdid with Fes el-Bali
The founder of the 'Alawi dynasty, Moulay Rashid, took Fes in 1666 and made it his capital. He set about restoring the city after a long period of neglect. He built the Kasbah Cherarda (also known as the Kasbah al-Khemis) to the north of Fes el-Jdid and of the Royal Palace in order to house a large part of his tribal troops. He also restored or rebuilt what became known as the Kasbah an-Nouar, which became the living quarters of his followers from the Tafilalt region (the 'Alawi dynasty's ancestral home). For this reason, the kasbah was also known as the Kasbah Filala ("Kasbah of the people from Tafilalt").

After Moulay Rashid's death Fes underwent another dark period, but from the reign of Moulay Muhammad ibn Abdallah onward it regained its power and prestige. The 'Alawis continued to rebuild or restore various monuments, as well as to expand the grounds of the Royal Palace a number of times. The final and most significant change to Fes's topography was made during the reign of Moulay Hasan I (1873-1894), who finally connected Fes el-Jdid and Fes el-Bali by building a walled corridor between them. Within this new corridor, between the two cities, lay new gardens and summer palaces used by the royals and the capital's high society, such as the Jnan Sbil Gardens.

The outline of Fes el-Jdid (and of the Royal Palace inside it) was also altered many times in this period. In the 19th century, the creation of the vast Agdal Gardens to the west and the addition of the Bab Bou Jat Mechouar and the New Mechouar to the north all extended the perimeter of city and required the diversion of the Oued Fes river further north as well.

Kasbahs and forts
A number of fortresses and fortified enclosures were built across the city over many eras. The term "kasbah" (قَـصَـبَـة) 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. The term borj (برج), generally meaning "tower", was applied to a number of heavily fortified military structures and bastions, especially those of the Saadi era. The following includes a list of the most important structures of either kind:


 * Kasbah Bou Jeloud: This kasbah is no longer fortified today, but preserves its footprint in the layout of the area, which includes the Almohad-era Bou Jeloud Mosque. It was once the citadel of the Almoravids and then the Almohad authorities, and continued to be used as the governor's residence even up to the 20th century.
 * Kasbah an-Nouar: Also known as Kasbah Filala, it dates from the Almohad and 'Alawi periods.
 * Kasbah Cherarda: Also known as Kasbah al-Khemis, it dates from the 'Alawi period.
 * Kasbah Tamdert: Near Bab Ftouh gate in the southeast, it dates from the Saadi period.
 * Borj Nord: This Saadi fort bears the clearest signs of European influence in its structure, and stands on the hills north of the city, near the Marinid Tombs. Today it houses an Arms Museum.
 * Borj Sud: The "sister" of Borj Nord, it stands on the hills overlooking Fes el-Bali from the south.
 * Bastions of Fes el-Jdid: These three massive towers were built by the Saadis along the eastern and southeastern corners of Fes el-Jdid's walls.
 * Borj Sheikh Ahmed: The northernmost and easternmost bastion, this one was built at the corner of the walls closest to Fes el-Bali. Today it can also be prominently seen overlooking the southern edge of the Jnan Sbil Gardens.
 * Borj Twil: The southeastern bastion, located between the other two.
 * Borj Sidi Bou Nafa': The southernmost bastion, located on the south side of what used to be the gate of Bab Jiaf (also known as Bab Sidi Bou Nafa; now occupied by a main road).

City gates
There are numerous gates in both Fes el-Bali and Fes el-Jdid, of varying significance, ranging from monumental military structures to simple openings in the wall. They are listed below.

Gates of Fes el-Bali
The gates of Fes el-Bali include the following:


 * Bab Mahrouk: Historically the main western entrance in the city walls, built in the early 13th century during the rule of Muhammad al-Nasir, in Almohad architectural style. It exists alongside the Bab Mahrouk Cemetery and Kasbah an-Nouar. Its name means "Gate of the Burnt".
 * Bab Bou Jeloud: The main western entrance to Fes el-Bali today (located further east than Bab Mahrouk), and an iconic monument of the medina of Fez. It was built in 1913 at the beginning of French colonial rule, replacing an older and more modest gate of the same name.
 * Bab Ftouh: The main southweastern gate of Fes el-Bali. It dates essentially from the Almohad period (12th-13th century) in its current form. Near it is the Bab Ftouh Cemetery and the Kasbah Tamdert.
 * Bab Guissa: The main northeastern gate of Fes el-Bali, also dating in its current form from the Almohad period (12th-13th century). The original monumental gate, still standing, has a bent entrance, but a small side gate was later opened to provide easier direct access today. Next to it is the Bab Guissa Mosque.
 * Bab el-Hadid: This gate is located in the southwestern part of the city walls. Before the 20th century, this area of the old city was not densely built up and was mainly occupied by gardens and mansions for the wealthier people of Fes. As a result, no major roads led to it for most of its history.
 * Bab Jdid: Meaning the "New Gate", this gate was located at the southern end of the city near the exit of the Oued Bou Khrareb (the central river separating the Qarawiyyin and Andalous districts). Like Bab el-Hadid, it was not historically a major gate due to the sparsely inhabited land behind it. Today, the area of the former gate is crossed by one of the only major roads that cars and buses can take into the central medina, leading to Place R'Cif. As of 2022, a major construction project to create additional parking for the medina was ongoing in the area. The project's completion was delayed for various reasons, including the discovery of an ancient cemetery on site during construction.
 * Bab Sidi Bou Jida (or Bab Sidi Boujda): Just a small gate today, this gate is located at the northeastern tip of the city (in an area where the city walls bulged outwards slightly) and served as the outer entrance to the Keddane (or Keddan) district. The earliest gate in this area was originally called Bab Abi Sofyan, while a later gate was also called Bab Beni Msafer.
 * Bab el-Hamra: Meaning the "Red Gate" (or perhaps "Gate of the Red Lady"), this gate was located a short distance west of Bab Ftouh, but by the 16th century it seems to have had already disappeared. Its name was preserved through the name of the Bab al-Hamra Cemetery, located inside the city walls and west of Bab Ftouh.
 * Bab Khoukha: Also known as Bab Knisa ("Gate of the Church"), it lay at the eastern/southeastern end of the city, just northeast of Bab Ftouh. Like Bab al-Hamra, it had already disappeared by the 16th century, leaving only its name as a toponym in the area.
 * Bab Chorfa: The gate to the Kasbah An-Nouar, a citadel at the western end of Fes el-Bali. Its current form dates from the 'Alawi era. The name means the "Gate of the Sharifs".
 * Bab Chems: This simple gateway is located at the western end of Place Bou Jeloud and at the eastern end of the walled corridor leading from the Old Mechouar and Fes el-Jdid. It was probably first opened in the late 19th century when Moulay Hasan I built the corridor. "Bab Chems" is a French transliteration of Bab (al-)Shams, Arabic for "Gate of the Sun". The name probably came from a small garrison post or fort nearby, just to the west, called Kasbah ech-Chems (or Kasbah ash-Shams). Although the gate today has a traditional pointed horseshoe-arch appearance, in the 19th century it was actually built in an Italianate or neoclassical style and was known as Bab Campini, after the Italian architect who designed it. French officials during the Protectorate period (20th century) later remodelled it to its current appearance in order to erase what they viewed as foreign influences in local Moroccan architecture.

Gates of Fes el-Jdid
The gates of Fes el-Jdid include the following:


 * Bab Semmarine: This gate is near the Jewish Quarter (Mellah), at the southern end of the Grande Rue (main north–south street) of Fes el-Jdid. Dating from 1276, it was the main southern gate of the city in its main (or inner) fortified wall and the southern entrance to the original residential districts of Fes el-Jdid proper. It underwent modifications in the early 20th century.
 * Bab al-Amer: This gate originally dates from 1276 and is the main western entrance to Fes el-Jdid, located near the western end of the Jewish Mellah. It was located along the outer southern wall of Fes el-Jdid (whereas Bab Semmarine was located along the more heavily fortified inner wall).
 * Bab Dekkakin (or Bab Dekakene): Situated between the Old Mechouar (or Vieux Méchouar) and the New Mechouar (or Nouveau Méchouar), directly across from the northeastern entrance to the Dar al-Makhzen (royal palace). The name means "Gate of the Benches". It was originally known as Bab es-Sebaa or Bab es-Seba' ("Gate of the Lion"). It dates from 1276 and was originally the main northern entrance to Fes el-Jdid, before undergoing some modifications in the late 19th century and early 20th century.
 * Bab Segma: This gate is located in the area between Kasbah Cherarda and the walls of the New Mechouar, marked by two massive octagonal towers dating from the Marinid period (with subsequent remodeling). These two octagonal towers were originally part of an entrance to the Mosara Garden, a vast Marinid royal garden created in 1287 to the north of Fes el-Jdid. The gardens were enclosed by their own walls and were supplied with water via a raised aqueduct that ran between Bab Dekkakin and Bab Segma. The gardens fell into disuse and disappeared after the Marinid period, leaving only the towers of Bab Segma. The name later came from a pious woman called Amina Sagma who was buried here in 1737, and has remained as a toponym in the area sometimes applied to the newer Bab Khibbat es-Smen.
 * Bab Kbibat es-Smen: This is the northern entrance gate to the New Mechouar (historically different from Bab Segma but sometimes going by the same name). The gate dates from 1886, when Moulay Hassan built the adjoining Dar al-Makina. The gate is also named as Bab Moussiki in another source.
 * Bab Bou Jat: The former western entrance to the Moulday Abdallah quarter of Fes el-Jdid, but closed off in modern times during the expansion of the Dar al-Makhzen grounds.
 * Bab Agdal: A well-preserved Marinid-era gate, probably dating from 1276 (Fes el-Jdid's foundation), located at the northwestern corner of what is now the Lalla Mina Gardens inside the Royal Palace. This gate, which preserves the Marinid defensive features such as a bent entrance, was formerly the western entrance to Fes el-Jdid and to the Royal Palace, but it was made superfluous when the vast Agdal Gardens, with their own set of walls, were created on its western side.
 * Bab Jiaf (or Bab Sidi Bou Nafa'): No longer standing today, this was a gate along the outer southern wall of Fes el-Jdid and was located just east of Bab Semmarine. The area of the former gate is now crossed by the main road for car traffic (Rue Bou Ksissat) that passes between the Mellah and Bab Semmarine. The name still survives as a toponym in the area, and one of the nearby Saadi bastions was named after it.
 * Bab Riafa (or Bab Jbala): This gate could be said to belong to Fes el-Jdid but, more precisely, it is located in the southern wall of the walled corridor built by Moulay Hassan in the 19th century to link Fes el-Jdid with Fes el-Bali. It was formerly the site of a garrison post or small kasbah housing troops from the Rif mountain region in northern Morocco, hence the name meaning "Gate of the Rifians" (Bab Jbala means "Gate of the Mountain", presumably another reference to the Rif). A main road (Avenue de l'UNESCO) passes through a modern gateway there today.
 * Bab el-Mellah: This gate is located inside the southernmost district of Fes el-Jdid, along its main street. It marked the boundary between the Sidi Bou Nafa neighbourhood to the east (located directly south of Bab Semmarine, near the borj or bastion of the same name) and the Jewish Mellah proper to the west (the former barracks of the Syrian archer regiments of the Marinid sultan). The original gate has, like many older gates, a bent entrance and it was flanked by two large defensive towers.