The architecture of Fez, Morocco, reflects the wider trends of Moroccan architecture dating from the city’s foundation in the late 8th century and up to modern times. The old city (medina) of Fez, consisting of Fes el-Bali and Fes el-Jdid, is notable for being an exceptionally well-preserved medieval North African city and is classified as a UNESCO World Heritage Site. A large number of historic monuments from different periods still exist in it today, including mosques, madrasas, synagogues, hammams (bathhouses), souqs (markets), funduqs (caravanserais), defensive walls, city gates, historic houses, and palaces.
Fez reached its height in the 13th–14th centuries under the Marinids when it replaced Marrakesh as the capital of the kingdom. The urban fabric and the principal monuments in the medina – madrasas, fondouks, palaces, residences, mosques and fountains – date from this period. The Al-Attarine Madrasa in Fez epitomizes many of the customary features of Moroccan architecture.
The Fortifications of Fez comprise a complex circuit of ramparts and gates surrounding Fes el-Bali and Fes el-Jdid. They also include a number of kasbahs (citadels) and forts which were built both to protect and to control the city. The walls of Fès were generally built in rammed earth, an ancient building technique found across the Near East, Africa, and beyond.