Moroccan architecture reflectsMorocco's diverse geography and long history, marked by successive waves of settlers through both migration and military conquest. This architectural heritage includesancient Roman sites, historicIslamic architecture, localvernacular architecture, 20th-centuryFrench colonial architecture, andmodern architecture.[1]
Much of Morocco's traditional architecture is marked by the style that developed during theIslamic period, from the 7th century onward. This architecture was part of a wider tradition of"Moorish" or western Islamic architecture, which characterized both theMaghreb (Morocco, Algeria, and Tunisia) andal-Andalus (Muslim Spain and Portugal).[2][3][1][4] It blended influences fromAmazigh (Berber) culture inNorth Africa, pre-Islamic Spain (Roman,Byzantine, andVisigothic), and contemporary artistic currents in the IslamicMiddle East to elaborate a unique style over centuries with recognizable features such as thehorseshoe arch,riad gardens, and elaborategeometric andarabesque motifs in wood,carved stucco, andzellij tilework.[2][3][5][6]
Although Moroccan Amazigh architecture is not strictly separate from the rest of Moroccan architecture, many structures and architectural styles are distinctively associated with traditionally Amazigh or Amazigh-dominated regions such as theAtlas Mountains and the Sahara and pre-Sahara regions.[7] These mostly rural regions are marked by numerouskasbahs (fortresses) andksour (fortified villages) shaped by local geography and social structures, of which one of the most famous isAit Benhaddou.[8] They are typically made oframmed earth and decorated with local geometric motifs. Far from being isolated from other historical artistic currents around them, the Amazigh peoples of Morocco (and across North Africa) adapted the forms and ideas of Islamic architecture to their own conditions[9] and in turn contributed to the formation of Western Islamic art, particularly during their political domination of the region over the centuries ofAlmoravid,Almohad, andMarinid rule.[6][7]
Modern architecture in Morocco includes many examples of early 20th-centuryArt Deco and localneo-Moorish architecture constructed during theFrench andSpanish colonial occupation of the country between 1912 and 1956 (or until 1958 for Spain).[10][11] In the later 20th century, after Morocco regained its independence, some new buildings continued to pay tribute to traditional Moroccan architecture and motifs (even when designed by foreign architects), as exemplified by theMausoleum of King Mohammed V (completed in 1971) and the massiveHassan II Mosque inCasablanca (completed in 1993).[12][13] Modernist architecture is also evident in contemporary constructions, not only for regular everyday structures but also in major prestige projects.[14][15]

Although less well-documented, Morocco's earliest historical periods were dominated byBerber groups and kingdoms, up to the Berber kingdom ofMauretania.[16] In the 7th or 8th century BC thePhoenicians founded a colony ofLixus on theAtlantic coast, which later came underCarthaginian, Mauretanian, and eventuallyRoman control.[17][18] Other important towns such asTingis (present-dayTangier) and Sala (Chellah) were founded and developed by Phoenicians or Mauretanian Berbers.[19]: 69 The settlement of Volubilis was the traditional capital of the Mauretanian kingdom from the second century BC onward, though it may have been founded as early as the third century BC.[20] Under Mauretanian rule its streets were laid out in agrid plan and may have included a palace complex and fortified walls.[20][16]: 32 The influence ofPunic (Carthaginian) culture in the city is archaeologically attested by Punicstelae and the remains of a Punic temple.[20] The Mauretanian kingJuba II (r. 25 BC–23 AD), aclient king of Rome and a promoter of lateHellenistic culture, built a palace in Lixus that was based on Hellenistic models.[16]: 43–44 [18]
Roman settlement and construction was much less extensive in the territory of present-day Morocco, which was on the edge of the empire, than it was in nearby regions likeHispania orAfrica (present-dayTunisia). The most significant cities, and the ones most directly influenced byRoman culture, were Tingis, Volubilis, and Sala.[19]: 67–68 Large-scaleRoman architecture was relatively rare; for example, there is only one knownamphitheater in the region, at Lixus.[19]: 68 Volubilis, the most inland major city, became a well-developed provincial Romanmunicipium and its ruins today are the best-preserved Roman site in Morocco. It includedaqueducts, aforum,bath complexes, abasilica, theCapitoline Temple, and atriumphal arch dedicated to the emperorCaracalla and his mother in 216–217. The site has also preserved a number of fineRoman mosaics.[20][21] It continued to be an urban center even after the end of Roman occupation in 285, with evidence ofLatinChristian, Berber, andByzantine (Eastern Roman) occupation.[22]: 53

In the early 8th century the region became steadily integrated into the emergingMuslim world, beginning with themilitary incursions ofMusa ibn Nusayr and becoming more definitive with the advent of theIdrisid dynasty at the end of that century.[23] The arrival of Islam was extremely significant as it developed a new set of societal norms (although some of them were familiar toJudeo-Christian societies) and institutions which therefore shaped, to some extent, the types of buildings being built and the aesthetic or spiritual values that guided their design.[24][25][26][27]
The Idrisids founded the city ofFes, which became their capital and the major political and cultural center of early Islamic Morocco.[19][28] In this early period Morocco also absorbed waves of immigrants from Tunisia andal-Andalus (Muslim-ruledSpain andPortugal), who brought in cultural and artistic influences from their home countries.[23][1] The earliest well-known Islamic-era monuments in Morocco, such as theal-Qarawiyyin andAndalusiyyin mosques in Fes, were built in thehypostyle form and made early use of thehorseshoe or "Moorish" arch.[2][29] These reflected early influences from major monuments like theGreat Mosque of Kairouan and theGreat Mosque of Cordoba.[30] In the 10th century much of northern Morocco came directly within the sphere of influence of theUmayyad Caliphate of Cordoba, with competition from theFatimid Caliphate further east.[23] Early contributions to Moroccan architecture from this period include expansions to the Qarawiyyin and Andalusiyyin mosques and the addition of their square-shaftedminarets, the oldest surviving mosques in Morocco, which anticipate the standard form of later Moroccan minarets.[29][2][31]: 126

The collapse of the Cordoban caliphate in the early 11th century was followed by the significantadvance of Christian kingdoms into Muslim al-Andalus and the rise of major Berber empires in Morocco. The latter included first theAlmoravids (11th–12th centuries) and then theAlmohads (12th–13th centuries), both of whom also took control of remaining Muslim territory in al-Andalus, creating empires that stretched across large parts of western and northern Africa and into Europe.[30] This period is considered one of the most formative stages of Moroccan andMoorish architecture, establishing many of the forms and motifs that were refined in subsequent centuries.[2][32][30][33] These two empires were responsible for establishing a new imperial capital atMarrakesh and the Almohads also began construction of a monumental capital inRabat.

The Almoravids adopted the architectural developments of al-Andalus, such as the complexinterlacing arches of the Great Mosque in Cordoba and of theAljaferia palace inZaragoza, while also introducing new ornamental techniques from the east such asmuqarnas ("stalactite" or "honeycomb" carvings).[32][34] The AlmohadKutubiyya andTinmal mosques are often considered the prototypes of later Moroccan mosques.[32][2] The monumental minarets (e.g. the Kutubiyya minaret, theGiralda ofSeville, and theHassan Tower of Rabat) and ornamental gateways (e.g.Bab Agnaou in Marrakesh, andBab Oudaia andBab er-Rouah in Rabat) of the Almohad period also established the overall decorative schemes that became recurrent in these architectural elements thenceforth. The minaret of theKasbah Mosque of Marrakesh was particularly influential and set a style that was repeated, with minor elaborations, in the following Marinid period.[35][32][2] The Almoravids and Almohads also promoted the tradition of establishing garden estates in the countryside of their capital, such as theMenara Garden and theAgdal Gardens on the outskirts of Marrakesh. In the late 12th century the Almohads created a new fortified palace district, theKasbah of Marrakesh, to serve as their royal residence and administrative center. These traditions and policies had earlier precedents in al-Andalus – such as the creation ofMadinat al-Zahra near Cordoba – and were subsequently repeated by future rulers of Morocco.[35][30][2][36]

The BerberMarinid dynasty that followed was also important in further refining the artistic legacy established by their predecessors. Based in Fes, they built monuments with increasingly intricate and extensive decoration, particularly in wood andstucco.[2] They were also the first to deploy extensive use ofzellij (mosaic tilework in complexgeometric patterns).[3] Notably, they were the first to buildmadrasas, a type of institution which originated inIran and had spread west.[2] The madrasas of Fes, such as theBou Inania,al-Attarine, andas-Sahrij madrasas, as well as theMarinid madrasa ofSalé and the otherBou Inania inMeknes, are considered among the greatest architectural works of this period.[37][4][2] While mosque architecture largely followed the Almohad model, one noted change was the progressive increase in the size of thesahn or courtyard, which was previously a minor element of the floor plan but which eventually, in the subsequentSaadian period, became as large as the main prayer hall, and sometimes larger.[38] Like the Almohads before them, the Marinids created a separate palace-city for themselves; this time, outside Fes. Later known asFes Jdid, this new fortified citadel had a set of double walls for defense, a newGrand Mosque, a vast royal garden to the north known asel-Mosara, residences for government officials, and barracks for military garrisons.[36][39] Later on, probably in the 15th century, a newJewish quarter was created on its south side, the firstmellah in Morocco, prefiguring the creation of similar districts in other Moroccan cities in later periods.[40][41]
The architectural style under the Marinids was very closely related to that found in theEmirate of Granada, in Spain, under the contemporaryNasrid dynasty.[2] The decoration of the famousAlhambra is thus reminiscent of what was built in Fes at the same time. WhenGranada was conquered in 1492 byCatholic Spain and the last Muslim realm of al-Andalus came to an end, many of the remainingSpanish Muslims (andJews) fled to Morocco andNorth Africa, further increasing the Andalusian influence in these regions in subsequent generations.[4]

After the Marinids came theSaadian dynasty, which marked a political shift from Berber-led empires to sultanates led by Arabsharifian dynasties. Artistically and architecturally, however, there was broad continuity and the Saadians are seen by modern scholars as continuing to refine the existing Moroccan-Moorish style, with some considering theSaadian Tombs in Marrakesh as one of the apogees of this style.[38]: 194–196 [2]: 422
Starting with the Saadians and continuing with the Alawis (their successors and the reigning monarchy today), Moroccan art and architecture is portrayed by modern (Western) scholars as being relatively conservative; meaning that it continued to reproduce the existing style with high fidelity but did not introduce major new innovations.[2]: 421–422 [42][38]: 194 The Saadians, especially under the sultansAbdallah al-Ghalib andAhmad al-Mansur, were extensive builders and benefitted from great economic resources at the height of their power in the late 16th century. In addition to the Saadian Tombs, they also built theBen Youssef Madrasa and several major mosques in Marrakesh including theMouassine Mosque and theBab Doukkala Mosque. These two mosques are notable for being part of larger multi-purpose charitable complexes including several other structures like public fountains,hammams, madrasas, and libraries. This marked a shift from the previous patterns of architectural patronage and may have been influenced by the tradition of building such complexes inMamluk architecture in Egypt and thekülliyes ofOttoman architecture.[35]: 367 [43] The Saadians also rebuilt the royal palace complex in the Kasbah of Marrakesh for themselves, where Ahmad al-Mansur constructed the famousEl Badi Palace (built between 1578 and 1593) which was known for its superlative decoration and costly building materials including Italianmarble.[35][38]

The Alawis, starting withMoulay Rashid in the mid-17th century, succeeded the Saadians as rulers of Morocco and continue to be the reigning monarchy of the country to this day. As a result, many of the mosques and palaces standing in Morocco today have been built or restored by the Alawis at some point or another.[4][35][28][2]: 383–422 [42] Ornate architectural elements from Saadian buildings, most famously from their lavish El Badi Palace in Marrakesh, were also stripped and reused in buildings elsewhere during the reign ofMoulay Isma'il (1672–1727).[38] Moulay Isma'il is also notable for having built a vastimperial palace complex – similar to previous palace-citadels but on a grander scale than before – in Meknes, where the remains of his monumental structures can still be seen today.[44][36]: 265–267 In his timeTangier was also returned to Moroccan control in 1684, and much of the city's current Moroccan and Islamic architecture dates from his reign or after.[45][4]

In 1765 SultanMohammed Ben Abdallah (Moulay Ismail's grandson) started the construction of a new port city calledEssaouira (formerly Mogador), located along the Atlantic coast as close as possible to his capital at Marrakesh, to which he tried to move and restrict European trade.[36]: 264 He hired European architects to design the city, resulting in a relatively unique Moroccan-built city withWestern European architecture, particularly in the style of its fortifications. Similar coastal fortifications orbastions, usually known as asqala, were built at the same time in other port cities like Anfa (present-dayCasablanca), Rabat,Larache, and Tangier.[2]: 409 Up until the late 19th century and early 20th century, the Alawi sultans and their ministers continued to build beautiful palaces, many of which are now used as museums or tourist attractions, such as theBahia Palace in Marrakesh, theDar Jamaï in Meknes, and theDar Batha in Fes.[3][11]

In the 20th century, Moroccan architecture and cities were also shaped by the period ofFrench colonial control (1912–1956) as well asSpanish colonial rule in the north of the country (1912–1958). This era introduced new architectural styles such asArt Nouveau,Art Deco, and othermodernist styles, in addition to European ideas abouturban planning imposed by colonial authorities.[46] The European architects and planners also drew on traditional Moroccan architecture to develop a style sometimes referred to asNeo-Mauresque (similar toNeo-Moorish) orArabisant ("Arabizing"), blending contemporary European architecture with apastiche of traditional Moroccan architecture, with the encouragement of the French resident generalHubert Lyautey.[11][12][10]
The French moved the capital to Rabat and founded a number ofVilles Nouvelles ("New Cities") next to the historicmedinas (old walled cities) to act as new administrative centers, which have since grown beyond the old cities. In particular,Casablanca was developed into a major port and quickly became the country's most populous urban center.[23] As a result, thecity's architecture became a major showcase of Art Deco and colonialMauresque architecture. Notable examples include the civic buildings ofMuhammad V Square (Place Mohammed V), theCathedral of Sacré-Coeur, the Art Deco-styleCinéma Rialto, the Neo-Moorish-styleMahkamat al-Pasha in theHabous district.[11][47][48][49] Similar architecture also appeared in other major cities like Rabat andTangier, with examples such as theGran Teatro Cervantes in Tangier and theBank al-Maghrib andpost office buildings in downtown Rabat.[50][51][52] Elsewhere, the smaller southern town ofSidi Ifni is also notable for Art Deco architecture dating from the Spanish occupation.[53]

Elie Azagury became the firstMoroccan modernist architect in the 1950s.[54][55] In the later 20th century and into the 21st century, contemporary Moroccan architecture also continued to pay tribute to the country's traditional architecture. In some cases, international architects were recruited to design Moroccan-style buildings for major royal projects such as theMausoleum of Mohammed V in Rabat and the massiveHassan II Mosque in Casablanca.[56][13] The monumental new gates of theRoyal Palace in Fez, built in 1969–1971, also made use of traditional Moroccan craftsmanship.[3] The newtrain stations of Marrakesh andFes are examples of traditional Moroccan forms being adapted to modern architecture.[57] The traditional Moroccan style or imitations of it have also been employed frequently in the design of new hotels.[12]
Modernist architecture has also continued to be used, exemplified by buildings like theSunna Mosque (1966) and theTwin Center (1999) in Casablanca. More recently, some 21st-century examples of major or prestigious architecture projects include the extension of Marrakesh'sMenara Airport (completed in 2008),[58] theNational Library of Morocco in Rabat (2008), the award-winning High-Speed Train Station inKenitra (opened in 2018),[59][60] theFinance City Tower in Casablanca (completed in 2019 and one of thetallest buildings in Morocco),[61] and the newGrand Theatre of Rabat byZaha Hadid (due to be completed in late 2019).[62][63]
As with the rest of theMediterranean world, the culture and monuments ofClassical Antiquity and ofLate Antiquity had an important influence on the architecture of the Islamic world that came after them. In Morocco, the former Roman city ofVolubilis acted as the first Idrisid capital before the foundation of Fes.[28][19] The columns andcapitals of Roman and early Christian monuments were frequently re-used asspolia in the early mosques of the region – although this was far less common in Morocco, where Roman remains were far sparser.[36]: 43 Later Islamic capitals developed from these models in turn.[2][64] In other examples, the vegetal and floral motifs of Late Antiquity formed one of the bases from which Islamic-eraarabesque motifs were derived.[65][2] The iconic horseshoe arch or "moorish" arch, which became a regular feature of Moroccan and Moorish architecture, also had some precedents inByzantine andVisigothic buildings.[2]: 163–164 [5] Lastly, another major legacy ofGreco-Roman heritage was the continuation and proliferation ofpublic bathhouses, known ashammams, across the Islamic world – including Morocco – which were closely based on Romanthermae and took on added social roles.[2][66][67]

The arrival of Islam with Arab conquerors from the east in the early 8th century brought about social changes which also required the introduction of new building types such as mosques. The latter followed more or less the model of other hypostyle mosques which were common across much of the Islamic world at the time.[30][36] The traditions ofIslamic art also introduced certain aesthetic values, most notably a general preference for avoidingfigurative images due to a religious taboo onicons or worshipped images.[68][69] Thisaniconism in Islamic culture caused artists to explore non-figural art, and created a general aesthetic shift towardmathematically-based decoration, such as geometric patterns, as well as other relatively abstract motifs like arabesques.[70] While figurative images did continue to appear in Islamic art, by the 14th century these were generally absent in the architecture of the western regions of the Islamic world like Morocco.[65] Some figural images of animals still appeared occasionally in royal palaces, such as the sculptures of lions and leopards in the monumental fountain of a former Saadian palace in the Agdal Gardens.[71][72]
Aside from the initial changes brought about by the arrival of Islam, Moroccan culture and architecture continued afterwards to adopt certain ideas and imports from the eastern parts of the Islamic world. These include some of the institutions and building types that became characteristic of the historic Muslim world. For example,bimaristans, historical equivalents of hospitals, first originated further east inIraq, with the first one being built byHarun al-Rashid (between 786 and 809).[73] They spread westward and first appeared inMorocco around the late 12th century when the Almohads founded a maristan in Marrakesh.[74][75]Madrasas, another important institution, first originated inIran in the early 11th century underNizam al-Mulk, and were progressively adopted further west.[2][76][77] The first madrasa in Morocco (Madrasat as-Saffarin) was built in Fes by the Marinids in 1271, and madrasas further proliferated in the 14th century.[2][78] In terms of decorative motifs,muqarnas, a notable feature of Moroccan architecture introduced in the Almoravid period in the 12th century,[2]: 237 also originated at first in Iran before spreading to the west.[32][34]

The culture of Muslim-controlled Al-Andalus, which existed across much of the Iberian Peninsula to the north between 711 and 1492, also had close influence on Moroccan history and architecture in a number of ways – and was in turn influenced by Moroccan cultural and political movements.Jonathan Bloom, in his overview of western Islamic architecture, remarks that he "treats the architecture of North Africa and the Iberian Peninsula together because theStraits of Gibraltar were less of a barrier and more of a bridge."[36]: 13
In addition to the geographic proximity of the two regions, there were many waves of immigration from Al-Andalus to Morocco of both Muslims and Jews. One of the earliest waves were the Arab exiles from Cordoba who came to Fes after a failed rebellion in the early 9th century.[79]: 44 This population transfer culminated in the waves of refugees that came after thefall of Granada in 1492, including many former elites and members of the Andalusi educated classes.[4] These immigrants played important roles in Moroccan society. Among other examples, it was the early Arab exiles from Cordoba who gave the Andalusiyyin quarter of Fes its name[28] and it was Andalusi refugees in the 16th century who rebuilt and expanded the northern city ofTétouan.[4]
The period of theUmayyad Emirate and Caliphate in Cordoba, which marked the peak of Muslim power in Al-Andalus, was an especially crucial era which saw the construction of some of the region's most important early Islamic monuments. The Great Mosque of Cordoba is frequently cited by scholars as a major influence on the subsequent architecture of the western regions of the Islamic world due to both its architectural innovations and its symbolic importance as the religious heart of the powerful Cordoban Caliphate.[80][5][81][30]: 281–284 Many of its features, such as the ornamental ribbed domes,[2]: 149–151 theminbar, and the polygonalmihrab chamber, would go on to be recurring models of later elements in the Islamic architecture of the wider region.[30]: 284 Likewise, the decorative layout of theBab al-Wuzara' gateway, the original western gate of the mosque, demonstrates many of the standard elements that recur in the gateways and mihrabs of subsequent periods: namely, a horseshoe arch with decoratedvoussoirs, a rectangularalfiz frame, and an inscription band.[2]: 165–170 Georges Marçais (an important 20th-century scholar on this subject[82]: 279 ) also traces the origins of some later architectural features directly to the complex arches ofAl-Hakam II's 10th-century expansion of the mosque, namely thepolylobed arches found throughout the region after the 10th century and thesebka motif which became ubiquitous in Moroccan architecture after the Almohad period (12th-13th centuries).[2] Moreover, for much of the 10th century the Caliphate of Cordoba held northern Morocco in itssphere of influence. During this period CaliphAbd ar-Rahman III contributed to the architecture of Fes by sponsoring the expansion of the Qarawiyyin Mosque.[36] The same caliph also oversaw the construction of the first minaret of Cordoba's mosque, whose shape – a square-based shaft with a secondary lantern tower above it – some scholars see as precursor to other minarets in al-Andalus and Morocco.[36]: 63 Around the same time, in 756, he also sponsored the construction of a similar (though simpler) minaret for the Qarawiyyin Mosque, while the Umayyad governor of Fes sponsored the construction of a similar minaret for the Al-Andalusiyyin Mosque across the river.[36]: 63–66
Starting in the 11th century, the Berber-led Almoravid and Almohad empires, which were based in Morocco but also controlled al-Andalus, were instrumental in combining the artistic trends of both North Africa and al-Andalus, leading to what eventually became the definitive "Hispano-Moorish" or Andalusi-Maghribi style of the region.[30]: 276–328 The famousAlmoravid Minbar in Marrakesh, commissioned from a workshop of craftsmen in Cordoba, is one of the examples illustrating this cross-continental sharing of art and forms.[30][83] These traditions of Moorish art and architecture were continued in Morocco (and the wider Maghreb) well after the end of Muslim rule on the Iberian Peninsula.[2][36][38]

TheAmazigh peoples (commonly called "Berbers" in English) are a linguistically and ethnically diverse group of peoples who constitute the indigenous (pre-Arab) inhabitants of North Africa. They continue to represent a large part of the population in Morocco.[85] In addition to any local traditions of architecture, Amazigh peoples adapted the forms and ideas of Islamic architecture to their own conditions,[9][86] while the patronage of Amazigh dynasties contributed in turn to the formation of Western Islamic art, particularly during their political domination of the region over the centuries of Almoravid, Almohad, and Marinid rule.[6][87][7][32]: 28–30
Given the intermixing of peoples and settlements in the region over the centuries, it is not always easy to separate Amazigh and non-Amazigh architectural features; however, there are architectural types and features associated with predominantly Amazigh areas of Morocco (particularly the rural Atlas mountains and Saharan regions) which are sufficiently distinctive to constitute their own characteristic styles.[7] Because the relevant structures are made oframmed earth ormud-brick, which requires regular maintenance for preservation, the existing examples can rarely be dated reliably past the 19th or even 20th centuries.[87] Nonetheless, some characteristics of Berber architecture in North Africa – such as the regional forms of mosques – have been established for roughly a millennium.[7]
Structures such asagadirs (fortifiedgranaries) andqsūr or qsars (fortified villages; often spelledksar in singular andksour in plural) are prominent traditional features of Amazigh architecture in Morocco.[88] Likewise, the landscapes of the Atlas mountains and oases regions of Morocco are marked by numerouskasbahs – ortighremt inAmazigh languages[86] – which in this case refers to tall, fortified structures acting as forts, warehouses, and/or fortified residences.[87][7] These can in turn be decorated with local geometric motifs carved into the mud-brick exteriors.[87][7]

TheTreaty of Fes established the French Protectorate in 1912. The French resident general Hubert Lyautey appointedHenri Prost to oversee the urban development of cities under his control.[90][91] One important policy with long-term consequences was the decision to largely forego redevelopment of existing historic cities and to deliberately preserve them as sites of historic heritage, still known today as the "medinas". Instead, the French administration built new modern cities (theVilles Nouvelles) just outside the old cities, where European settlers largely resided with modern Western-style amenities. This was part of a larger "policy of association" adopted by Lyautey which favored various forms of indirect colonial rule by preserving local institutions and elites, in contrast with other French colonial policies that favored "assimilation".[89][92] The desire to preserve historic cities was also consistent with one of the trends in European ideas about urban planning at the time which argued for the preservation of historic cities in Europe – ideas which Lyautey himself favored.[91] In April 1914, the colonial government promulgated adahir for the "arrangement, development, and extension of urban plans,easements, and road tolls".[93][94] Thisdahir included building standards which directly affected the architecture at that time, as follows:
The building regulations maintained the country's pre-existing architectural features and balanced the rapid urbanization. Nonetheless, while this policy preserved historic monuments, it also had other consequences in the long-term by stalling urban development in these heritage areas and causing housing shortages in some areas.[89] It also suppressed local Moroccan architectural innovations, as for example in themedina of Fez where Moroccan residents where required to keep their houses – including any newly built houses – in conformity with what the French administration deemed to be the historic indigenous architecture.[92] ScholarJanet Abu-Lughod has argued that these policies created a kind of urban "apartheid" between the indigenous Moroccan urban areas – which were forced to remain stagnant in terms of urban development – and the new planned cities which were mainly inhabited by Europeans and which expanded to occupy lands outside the city which were formerly used by Moroccans.[95][96][89] This separation was partly softened by wealthy Moroccans who started moving into theVilles Nouvelles during this period.[91]

In some cases French officials removed or remodelled more recent pre-colonial Moroccan structures which had been visibly influenced by European styles in order to erase what they deemed as foreign or non-indigenous interference in Moroccan architecture.[92] In turn, French architects constructed buildings in the new cities that conformed to modern European functions and layouts but whose appearance was heavily blended with local Moroccan decorative motifs, resulting in aMauresque[11] or Neo-Moorish-style architecture. This was especially evident in some cities like the capital of Rabat, where grand new administrative buildings were designed in this style alongside European-style boulevards.[89] In some cases, the French also inserted Moroccan-looking structures in the fabric of the old cities, such as theBab Bou Jeloud gate in Fes (completed in 1913[97]) and the nearbyCollège Moulay Idriss (opened in 1914).[98][92] The new French-built cities also introduced more modernist styles such as Art Deco. This heritage is especially notable in Casablanca,[99] which became the main port city and the country's largest city during this period.[23]
One of the most common types of construction in Morocco wasrammed earth, an ancient building technique found across the Near East, Africa, and beyond.[100][101][102] It is also known as "pisé" (from French) or "tabia" (from Arabic).[3] Theramparts of Fes,Marrakesh, and Rabat, for example, were made with this process, even though some notable structures (like monumental gates) were also built in stone. It generally made use of local materials and was widely used thanks to its low cost and relative efficiency.[100] This material consisted of mud and soil of varying consistency (everything from smoothclay to rocky soil) usually mixed with other materials such asstraw orlime 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.[3] (For example, the walls of Fes and nearby Meknes contain up to 47% lime versus around 17% in Marrakesh and 12% in Rabat.[103]) 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 (likegravel).[3][1]: 80

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.[101][103] 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.[1] 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.[3]
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.[3][104] 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.

In addition to rammed earth,brick and (especially in desert regions)mudbrick were also common types of materials for the construction of houses, civic architecture, and mosques.[2][105][106] Many medievalminarets, for example, are made in brick, in many cases covered with other materials for decoration.[2][105]Stone masonry was also used in many notable monuments, especially in the Almohad period. The monumental Almohad gates of Bab Agnaou, Bab er-Rouah, and the main gate of theUdayas Kasbah (Bab Oudaia) made extensive use of carved stone.[2][32] The major Almohad minarets of the same period demonstrate the relative variability in construction material and methods, depending on the region and the demands of the structure: the minaret of the Kutubiyya Mosque is built inrubble masonry usingsandstone, the Giralda of Seville (in Spain) was made in local brick, the massive but unfinishedHassan Tower in Rabat was made in stone, and the minaret of the Kasbah Mosque in Marrakesh was made with a base of rubble stone and a main shaft of brick.[2]: 209–211
Wood was also extensively used, but mostly for ceilings and other elements above eye level such as canopies and upper galleries. Many buildings such as mosques and mausoleums have sloped wood-frame orartesonado-like ceilings, known locally asberchla orbershla,[38][107] often visually enhanced by the use of geometric patterns in their arrangement, sculpting, andpainted decoration.[2] Many doorways, street fountains, and mosque entrances are also highlighted with sculpted wood canopies which were characteristic of Moroccan and Moorish architecture.[2] Especially from theMarinid period onward, sculpted wood became a major component of architectural decoration.[4][2]
Wood generally came fromMoroccan cedar trees,[38][3][31] still highly valued today, which once grew abundantly on mountain slopes across the country but are now partly endangered and limited to forests of theMiddle Atlas.[108][109] Other types of wood were still occasionally used, however. The sculpted wood canopy of theShrob ou Shouf Fountain in Marrakesh was made ofpalm wood, for example.[32]: 128 The famous Minbar of the Kutubiyya Mosque, which was fabricated inCordoba (Spain) before being shipped to Marrakesh, was made primarily of cedar wood but itsmarquetry decoration was enhanced with more exotic woods of different colors such asjujube andAfrican blackwood.[83]

A very prominent and distinctive element of Moroccan and Moorish architecture is its heavy use ofcarved stucco for decoration across walls and ceilings.[2][4] Stucco, which is relatively cheap and easily sculpted, was carved and painted with motifs from a large repertoire including floral and vegetal motifs (arabesques), geometric patterns,calligraphic compositions, andmuqarnas forms.[4][2] (These were also common features in sculpted wood decoration.)

Tilework, particularly in the form of mosaic tilework calledzellij, was a standard decorative element along lower walls and for the paving of floors. It consisted of hand-cut pieces offaience in different colours fitted together to form elaborate geometric motifs, often based on radiating star patterns.[4][2]Zellij made its appearance in the region during the 10th century and became widespread by the 14th century during the Marinid period.[4] It may have been inspired or derived fromByzantine mosaics and then adapted by Muslim craftsmen for faience tiles.[4] The tiles are first fabricated inglazed squares, typically 10 cm per side, then cut by hand into a variety of pre-established shapes (usually memorizedby heart) necessary to form the overall pattern.[3] This pre-established repertoire of shapes combined to generate a variety of complex patterns is also known as thehasba method.[110] Although the exact patterns vary from case to case, the underlying principles have been constant for centuries and Moroccan craftsmen are still adept at making them today.[3][110]
Metal, particularlybronze andcopper, was also used to decorate or protect certain elements. Notably, the doors of many medieval mosques and madrasas were covered with bronze or copper plating which was carved and chiseled with geometric, arabesque, and calligraphic motifs.[4] The oldest surviving bronze artworks in Moorish-Moroccan art, for example, are the 12th-century bronze fittings found on several doors of the Qarawiyyin Mosque in Fes.[29]

Al-Andalus and the western Maghreb, including Morocco, was home to a distinctive style of Islamic architecture.[111] Often referred to as "Hispano-Moorish"[3]: 13 or "Hispano-Maghrebi" architecture,[112] it was characterized byhorseshoe arches,cuboid minarets,geometric decoration, vegetal motifs, andmuqarnas vaulting.[111][113] Instead of developing more complex structural designs, it prioritized, from around the 13th century onward, the development of more extensive and dense decoration, notably incarved plaster andmosaic tilework. Decoration was focused on the interior of buildings rather than their exteriors, though exterior gateways and minarets were an exception.[113][114][3]: 11 The interiors are typically arranged around central courtyards.[113][112][42]

The most characteristic arch type of western Islamic architecture is the horseshoe arch,[3]: 15 which became ubiquitous in the region from the early Islamic period.[2]: 45 Starting in the Almoravid period, the first pointed or "broken" horseshoe arches began to appear and became more widespread during the Almohad period.[2]: 234 During the same era, thepolylobed arch also became part of the common repertoire of arch profiles while the more ornatelambrequin arch also began to appear.[2]: 232–234 The use ofmuqarnas (also known as "stalactite" or "honeycomb" sculpting) developed in the region under the Almoravids and then became a regular feature afterwards, with mosque interiors frequently incorporating severalmuqarnas vaulted ceilings over specific areas.[113][111]

In surface decoration, the development of complex geometric motifs was likely encouraged by the trend towardsaniconism in Islam. These included designs with curved lines, which were less diverse but widely used in Morocco, and designs with straight lines, which were also common throughout the Islamic world and are often based around a central star-like pattern that branches outward with interlacing lines into a self-repeating pattern.[3]: 31–37 Among the more curvilinear motifs was a net-like lozenge motif that was known assebka orshabka ("net") or, in one of its variations,darj wa ktaf ("step and shoulder").[2]: 232 [3]: 32 [81]: 80
Floral or foliate ornamentation, in the form ofarabesques, developed early in the architecture of al-Andalus, during the rule of the Umayyads of Cordoba, and its earliest significant examples in Morocco are in Almoravid architecture. Almohad architecture continued this tradition but focused on larger-scale patterns, while Marinid architecture used dense but highly stylized variations of it, sometimes with a wider overlaying geometric pattern that generated repetition.[3]: 30–31
Many Islamic monuments feature Arabic inscriptions, which could be both informative or largely decorative. These include foundation inscriptions that record the date of their construction and the patron who sponsored it, inscriptions of Qur'anic verses, exhortations of God, or other religiously significant formulas.Arabic calligraphy, as in other parts of the Muslim world, was an art form. Early inscriptions were generally written in theKufic script, a style where letters were written with straight lines, while from the Marinid period (13th-14th century) onward the cursiveNaskh style was more common.[3]: 38

Morocco also hosts local styles of vernacular architecture in the rural the Atlas Mountains and Saharan regions to the south and east, which are associated with predominantly Amazigh (Berber) populations. While distinctive, these styles are also intermixed with traditional urban Islamic architectural elements,[7][86] and differ from region to region.[87]
Structures in these regions are largely made of rammed earth, mudbrick, rough stone, or a mix of these. The most impressive examples are the kasbahs (fortified palaces, also known astighremt),ksour (fortified villages, also known asigherm), andagadirs (fortified granaries) that dot the countryside. These structures vary in their layout, with some possessing more regular rectangular plans and others having irregular plans adapted to the terrain. The most important fortified structures are marked by their great height and verticality, with tall walls that taper towards the top and are crowned with triangular or horn-likecrenellations.[87]
This architecture notable for the presence of geometric motifs (calledlasserift in Amazigh) used to decorate the exterior of rural kasbahs and other prominent homes.[115] These motifs are emblematic of Amazigh architecture and are found in vernacular Amazigh architecture in other parts of North Africa.[115][7] This use of geometric motifs in North African Amazigh architecture is believed to have ancient origins:Henri Terrasse believed they had existed since before the first millennium BC due to their widespread precedents in Asia and elsewhere,[116] while historian Gabriel Camps dates its origins to the presence of Carthaginian culture in the first millennium BC.[115] Nonetheless, the art of these decorations have evolved and changed over time.[86]: 39
The motifs typically consist of a combination of circles, rosettes, hexagons, lozenges, chevrons, chequer-boards, and crosses.[7][115] These structures were built of rammed earth and mudbrick, and so the motifs were traditionally created by building the walls with recesses along their surface or by laying some bricks further back to form recesses.[86]: 34 Starting in the early 20th century, however, these motifs began to grow more complex and articulated, in part due to the growing links between the oases regions and the urban culture of major cities like Marrakesh. Patterns made of broader elements formed by recessed bricks and alcoves were replaced with narrower, finer motifs made of lines that were carved directly into the wall surfaces.[86]: 36–39 Salima Naji, a Moroccan architect and author on Berber architecture, notes that these more linear decorations, although more complex, lack the balance and rigorous composition of older motifs.[86]: 38
Some local mansions, such as theTelouet Kasbah and theTaourirt Kasbah used by theGlaoui clan, also hosted decoration and craftsmanship more typical of the imperial cities of Morocco and of the broader Islamic architectural styles prevalent there,[117][118] or in some cases mixed those traditions with local decorative traditions.[86] Horseshoe arches, widely used in architectural traditions throughout the region, were also widely used in local Amazigh architecture. As the arches served no structural purposes in rammed-earth architecture, their function was mainly decorative, used for doorways, windows, and blind arches or niches.[7][115]
In addition to the exterior wall motifs, doors and ceilings could were also decorated in larger residences. Two main types of ceilings are attested: wood ceilings andreed ceilings.[86]: 62 The first type typically consists of wooden panels, whose surfaces were painted with local geometric motifs, Islamic geometric motifs familiar in the major cities, and epigraphic inscriptions. Reed ceilings, which were constructed withwattles of reed stems, could be arranged to form basic two or three-dimensional patterns and then enhanced with red and black paint.[86]: 62–69
Traditional doors, made of wood, were carved and painted with a variety of geometric motifs which were probably influenced by urban Islamic motifs but interpreted by local craftsmen, often with less precision.[86]: 44–51 Doors could also be painted or carved withtalismanic seals, resembling medallion or amulet-like compositions containing written words and other symbols such as theseal of Solomon, mihrab-like motifs, and representations of thekhamsa.[86]: 53–59 Salima Naji notes that some of these decorations were intended to have magical properties, but that in some cases the art forms have likely persisted without the magical connotations.[86]: 57
The following is a summary of the different major types and functions of buildings and architectural complexes found in historic Moroccan architecture.

Mosques are the main place of worship inIslam.Muslims arecalled toprayer five times a day and participate in prayers together as a community, facing towards theqibla (direction of prayer). Every neighbourhood normally had one or many mosques in order to accommodate the spiritual needs of its residents. Historically, there was a distinction between regular mosques and "Friday mosques" or "grand mosques", which were larger and had a more important status by virtue of being the venue where thekhutba (sermon) was delivered on Fridays.[28]Friday noon prayers were considered more important and were accompanied by preaching, and also had political and social importance as occasions where news and royal decrees were announced, as well as when the current ruler's name was mentioned. In the early Islamic era of Morocco, there was typically only one Friday mosque per city, but over time Friday mosques multiplied until it was common practice to have one in every neighbourhood or district of the city.[119][105] Mosques could also frequently be accompanied by other facilities which served the community.[105][35]

Mosque architecture in Morocco was heavily influenced from the beginning by major well-known mosques inTunisia and al-Andalus (Muslim Spain and Portugal), two countries from which manyArab and Muslim immigrants to Morocco originated.[23] The Great Mosque of Kairouan and the Great Mosque of Cordoba, in particular, were models of mosque architecture.[2][30] Accordingly, most mosques in Morocco have roughly rectangular floor plans and follow the hypostyle format: they consist of a large prayer hall upheld and divided by rows ofhorseshoe arches running either parallel or perpendicular to the qibla wall (the wall towards which prayers faced). The qibla (direction of prayer) was always symbolized by a decorative niche or alcove in the qibla wall, known as amihrab.[3] Next to the mihrab there was usually a symbolic pulpit known as aminbar. The mosque also normally included, close to entrance, asahn (courtyard) which often had fountains or water basins to assist with ablutions. In early periods this courtyard was relatively minor in proportion to the rest of the mosque, but in later periods it became a progressively larger until it was equal in size to the prayer hall and sometimes larger.[38][105]
Lastly, mosque buildings were distinguished by their minarets: towers from which themuezzin issues the call to prayer to the surrounding city. (This was historically done by the muezzin climbing to the top and projecting his voice over the rooftops, but nowadays the call is issued over modern megaphones installed on the tower.) Moroccan minarets traditionally have a square shaft and are arranged in two tiers: the main shaft, which makes up most of its height, and a much smaller secondary tower above this which is in turn topped by afinial of copper or brass spheres.[2][105] Some Moroccan minarets have octagonal shafts, though this is more characteristic of the northern parts of the country.[4] Inside the main shaft a staircase, and in other cases a ramp, ascends to the top of the minaret.[2][105]
Medieval Moroccan mosques also frequently followed the "T-type" model established in the Almohad period. In this model the aisle or "nave" between the arches running towards the mihrab (and perpendicular to the qibla wall) was wider than the others, as was also the aisle directly in front of and along the qibla wall (running parallel to the qibla wall); thus forming a T-shaped space in the floor plan of the mosque which was often accentuated by greater decoration (e.g. more elaborate arch shapes around it or decorative cupola ceilings at each end of the "T").[105][38][35]
The whole structure of a mosque was also orientated or aligned with the direction of prayer (qibla), such that mosques were sometimes orientated in a different direction from the rest of the buildings or streets around it.[120] This geographic alignment, however, varied greatly from period to period. Nowadays it is standard practice across the Muslim world that the direction of prayer is the direction of the shortest distance between oneself and the Kaaba in Mecca. In Morocco, this corresponds to a generally eastern orientation (varying slightly depending on your exact position).[121] However, in early Islamic periods there were other interpretations of what the qibla should be. In the western Islamic world (theMaghreb and al-Andalus), in particular, early mosques often had a southern orientation, as can be seen in major early mosques like the Great Mosque of Cordoba and the Qarawiyyin Mosque in Fes. This was based on a reportedhadith of theIslamic prophetMuhammad which stated that "what is between the east and west is a qibla", as well as on a popular view that mosques should not be aligned towards theKaaba but rather that they should follow the cardinal orientation of the Kaaba itself (which is a rectangular structure with its own geometric axes), which is in turn aligned according to certain astronomical references (e.g. its minor axis is aligned with the sunrise of thesummer solstice).[122][121][120]

Although much reduced today, theJewish community of Morocco has a long history, resulting in the presence of manysynagogues across the country (some of which are defunct and some of which are still functioning). Synagogues had a very different layout from mosques but often shared similar decorative trends as the rest of Moroccan architecture, such ascolourful tilework and carved stucco,[97][123] though later synagogues were built in other styles too. Notable examples of synagogues in Morocco include theIbn Danan Synagogue in Fes, theSlat al-Azama Synagogue in Marrakesh, or theBeth-El Synagogue in Casablanca, though numerous other examples exist.[124][125]
Themadrasa was an institution which originated in northeasternIran by the early 11th century and was progressively adopted further west.[2][3] These establishments providedhigher education and served to trainIslamic scholars, particularly inIslamic law and jurisprudence (fiqh). The madrasa in theSunni world was generally antithetical to more "heterodox" religious doctrines, including the doctrine espoused by the Almohad dynasty. As such, it only came to flourish in Morocco in the late 13th century, under theMarinid dynasty which succeeded the Almohads.[2] To the Marinids, madrasas also played a part in bolstering the political legitimacy of their dynasty. They used this patronage to encourage the loyalty of the country's influential but independent religious elites and also to portray themselves to the general population as protectors and promoters of orthodox Sunni Islam.[2][31] Finally, madrasas also played an important role in training the scholars and elites who operated the state bureaucracy.[31]
Madrasas also played a supporting role to major learning institutions like the Qarawiyyin Mosque; in part because, unlike the mosque, they provided accommodations for students who came from outside the city.[3]: 137 [1]: 110 Many of these students were poor, seeking sufficient education to gain a higher position in their home towns, and the madrasas provided them with basic necessities such as lodging and bread.[28]: 463 However, the madrasas were also teaching institutions in their own right and offered their own courses, with someIslamic scholars making their reputation by teaching at certain madrasas.[1]: 141
Madrasas were generally centered around a main courtyard with a central fountain, off which other rooms could be accessed. Student living quarters were typically distributed on an upper floor around the courtyard. Many madrasas also included a prayer hall with a mihrab, though only the Bou Inania Madrasa of Fes officially functioned as a full mosque and featured its own minaret. In the Marinid era, madrasas also evolved to be lavishly decorated.[37][2]

MostMuslim graves are traditionally simple and unadorned, but in North Africa the graves of important figures were often covered in a domed structure (or a cupola of often pyramidal shape) called aqubba (also spelledkoubba). This was especially characteristic for the tombs of "saints" such aswalis andmarabouts: individuals who came to be venerated for their strong piety, reputed miracles, or other mystical attributes. Many of these existed within the wider category of Islamic mysticism known asSufism.
Some of these tombs became the focus of entire religious complexes built around them, known as azawiya (also spelledzaouia;Arabic:زاوية).[35][2][126] They typically included a mosque, school, and other charitable facilities.[2] Such religious establishments were major centers of Moroccan Sufism and grew in power and influence over the centuries, often associated with specificSufi Brotherhoods or schools of thought.[35][120] TheSaadian dynasty, for example, began as a military force associated with the zawiya and followers ofMuhammad al-Jazuli, a major 15th-century Sufi scholar.[35][38] TheAlawis after them also sponsored many zawiyas across the country.[4][35] Some of the most important examples of zawiyas in Morocco include theZawiya of Moulay Idris I near Meknes, theZawiya of his son Moulay Idris II in Fes, and the tombs of theSeven Saints in Marrakesh.[35][4]

Afunduq (also spelledfoundouk orfondouk;Arabic:فندق) was acaravanserai or commercial building which served as both an inn for merchants and a warehouse for their goods and merchandise.[2][3][120] In Morocco some funduqs also housed the workshops of local artisans.[28] As a result of this function, they also became centers for other commercial activities such asauctions and markets.[28] They typically consisted of a large central courtyard surrounded by a gallery, around which storage rooms and sleeping quarters were arranged, frequently over multiple floors. Some were relatively simple and plain, while others, like theFunduq al-Najjarin (or Fondouk Nejjarine) in Fes, were quite richly decorated.[4]

Hammams (Arabic:حمّام) arepublic bathhouses which were ubiquitous in Muslim cities. Many historic hammams have been preserved in cities like Marrakesh[127] and especially Fes, partly thanks to their continued use by locals up to the present day.[67][66] Among the better-known examples of preserved historic hammams in Morocco is the 14th-centurySaffarin Hammam in Fes, which has recently undergone restoration and rehabilitation.[67][128][129][66]
Essentially derived from theRoman bathhouse model, hammams normally consisted of four main chambers: a changing room, from which one then moved on to a cold room, a warm room, and a hot room.[2]: 215–216, 315–316 [67] Heat and steam were generated by ahypocaust system which heated the floors. The furnace re-used natural organic materials (such as wood shavings, olive pits, or other organic waste byproducts) by burning them for fuel.[130] The smoke generated by this furnace helped with heating the floors while excess smoke was evacuated through chimneys. Of the different rooms, only the changing room was heavily decorated withzellij, stucco, or carved wood.[2]: 316 The cold, warm, and hot rooms were usuallyvaulted or domed chambers without windows, designed to keep steam from escaping, but partially lit thanks to small holes in the ceiling which could be covered by ceramic or coloured glass.[2]: 316

As in many Muslim cities, water was provided freely to the public through a number of street fountains, similar tosebils in the formerOttoman Empire. Some fountains were decorated with a canopy of sculpted wood orzellij tilework.[2]: 410–413 Fountains were often attached to the outside of mosques, funduqs, and aristocratic mansions.[28][38] According toLeo Africanus, a traveler and chronicler in the 16th century, there were some 600 fountains in Fes alone.[28]: 236 Well-known examples in Morocco include theNejjarine Fountain in Fes, theShrob ou Shouf Fountain in Marrakesh, and theMouassine Fountain attached to themosque of the same name.[4][38]
Moroccan cities and towns were supplied with water through a number of different mechanisms. As elsewhere, most settlements were built near existing water sources such as rivers andoases. However, further engineering was necessary in order to supplement natural sources and in order to distribute the water across the city directly.
In Fes, for example, this was accomplished via a complex network of canals and channels which captured the waters of theOued Fes (Fes River) and distributed them across the entire city. These water channels (most of them now hidden under buildings) supplied houses, gardens, fountains, and mosques, powerednorias (waterwheels), and sustained certain industries such as thetanneries (e.g. the famousChouara Tannery).[131][106][28] Waterwheels were also used to lift water from these canals and into aqueducts to bring them even further, such as the enormousnoria, with a diameter of 26 meters, built by the Marinids to supply theirRoyal Gardens to the north ofFes el-Jdid.[132]
Marrakesh, located in a more arid environment, was supplied in large part by a system ofkhettaras, an ingenious and complex system by which an underground channel was dug beneath the slopes in the surrounding countryside until it reached the level of thephreatic zone.[120] This artificial channel was gently sloped to allow water to drain through it, but was sloped less steeply than the natural terrain so that it eventually emerged at the surface. In this way, the khettaras drew water from undergroundaquifers located on higher ground and brought them to the surface with the use of gravity alone. Once at the surface, the waters ran along canals and were stored in acistern or water basin, from which they could then be redistributed across the city.[120] This system was created under the Almoravids (who founded the city) and further developed and maintained by their successors.[120]
Oases regions in the desertic areas of Morocco also needed to make extensive use of irrigation and artificial water canals to make agriculture possible. Khettara systems were also used to supplement these water sources, especially as surface waters frequently dried up during the summer months. TheTafilalt oasis region, located along theZiz River valley, is a notable example of this system.[133][134]

Ariad (also transliterated asriyad;Arabic:رياض) is an interior garden found in many Moroccan mansions and palaces. It is normally rectangular and divided into four parts along its central axes, with a fountain at its middle.[120] Riad gardens probably originated inPersian architecture (where it is also known aschahar bagh) and became a prominent feature inMoorish palaces in Spain (such Madinat al-Zahra, the Aljaferia and the Alhambra).[120] In Morocco, they became especially widespread in the palaces and mansions of Marrakesh, where the combination of available space and warm climate made them particularly appealing.[120] The term is nowadays applied in a broader way to traditional Moroccan houses that have been converted into hotels and tourist guesthouses.[135][136]

Traditional Moroccan houses were typically centered around a courtyard or patio, often surrounded by a gallery, from which other rooms and sections branched off.[137][120] Courtyard houses have historical antecedents in the houses and villas of theGreco-Roman Mediterranean world and even earlier in theancient Middle East.[120] These houses were inward focused: even rich mansions are usually completely unadorned on the outside, with all decoration concentrated on the inside. There were few, if any, large windows on the outside. The entrance, which led to the courtyard, was typically abent entrance that prevented outsiders in the street from seeing directly inside the house. As with other traditional Moroccan structures, decoration included carved stucco, sculpted and painted wood, andzellij tilework.[137][120] The central patio/courtyard, known as thewast ad-dar ("middle of the house") was thus the centerpiece of the house. The size and craftsmanship of this interior space was an indication of the status and wealth of its owners, rather than the house's external appearance.[120]: 54
Today, modern materials have increasingly replaced certain traditional ones during the renovations of old houses. Woodenmashrabiya-type windows have been replaced with iron grilles, and cement is used for walls and pillars instead of brick and rammed earth.[120]: 63

Sultans andcaliphs, as well as the more powerful and wealthy government ministers in the 19th and 20th century, were able to build extensive palaces. TheDar al-Makhzen (meaning roughly "House/Abode of the Government") referred to the royal palace and center of government in a number of cities, such as theDar al-Makhzen in Fes,Rabat,Tangier, Meknes, or Marrakesh.[2][4][35] These palaces are still generally off-limit to most visitors today. However, royal palaces generally had amechouar, a large walled square which acted as a ceremonial space or parade ground at the entrance of the palace. These squares were accessible to the public and formed the public facade of the ruler's abode, sometimes overlooked by monumental and well-decorated gates leading to the palace grounds (e.g.Bab Mansour in Meknes).[138][35][3] The mechouars ofFes el-Jdid are examples of these, as was the vast square known today asPlace el-Hedim in Meknes. The palaces themselves typically consisted of many structures and pavilions arranged around a series of courtyards,pleasure gardens, and riads.[2][97] This resulted in palace complexes with a sprawling layout; in some cases this was a consequence of multiple phases of construction taking place in different periods. These palaces often also included a number of normally public facilities such as bathhouses and mosques, thus practically making them self-sufficient and self-contained royal cities.[138][35] Sultans also built additional outlying palaces and pavilions such as theDar Batha in Fes, as well as vast gardens on the outskirts of their capital city such as the Agdal Gardens in Marrakesh and the former Mosara Garden in Fes.[120][28][132]
In the 19th and early 20th centuries,grand viziers and other high officials of the government were able to accumulate enough power and wealth to build their own private palaces for themselves and their households.[35] Examples of these include theBahia Palace ofBa Ahmed (which was later taken over by the sultan), theDar al Bacha andDar Si Said in Marrakesh, theDar Moqri andDar Glaoui in Fes, and theDar Mnebbhi in Fes and itscounterpart in Marrakesh. Other local warlords and magnates were also sometimes capable of building their own lavish palaces, such as the Palace ofRaissouli inAsilah.[4] The Kasbah of Telouet, also built by the Glaoui clan and only partly preserved today, is another notable example of a 20th-century palace constructed with traditional methods, but located in a rural mountain town.[139][140]
Defensive city walls were generally built out oframmed earth[2] and consisted of a wall topped by awalkway for soldiers, reinforced at regular intervals by squarebastion towers. These walls were characteristically crowned bymerlons shaped like square blocks topped by pyramidal caps. Major examples of such fortifications still stand inMarrakesh,Fes, Rabat, and other cities.[120][4][132] The defensive walls constructed in Muslim al-Andalus also shared this general form, examples of which have survived in Cordoba,Seville, and Granada.[120]
As inmedieval fortifications elsewhere in the world, Moroccan city walls were pierced with a number ofgates to grant access in and out of the city. As these were often the weakest points of a defensive wall, they were usually more heavily fortified than the surrounding wall. Most medieval Moroccan gates had a bent entrance: their passage made sharpright-angle turns once or multiple times in order to slow down any attackers.[97][141][120] They ranged from very plain in appearance to highly monumental and ornamental. Many of the most monumental gates still standing today were built in stone during the Almohad period, including Bab Agnaou in Marrakesh and the gate of the Udayas Kasbah in Rabat.[30][32] As the defensive function of city walls and gates became less relevant in the modern era, gates became more ornamental and symbolic structures, like the Bab Bou Jeloud gate built in Fes in 1913.[97]

The term Kasbah (Arabic:قَـصَـبَـة,romanized: qaṣabah) in Morocco generally refers to a fortified enclosure, ranging from small garrison forts to vast walled districts which functioned as thecitadel and center of government in the city (such as the Kasbah of Marrakesh or the Kasbah of Tangier).[4][2][30]

A "kasbah" can also refer to various fortresses or fortified mansions in theAtlas Mountains and the desertoases regions of Morocco, which are also called atighremt inAmazigh.[7] In these regions, often traditionally Amazigh (Berber) areas, Kasbahs are typically made of rammed earth and mud-brick (or sometimes stone). They typically have a square floor plan with a central courtyard, multiple stories, and square towers or turrets at the corners. They are often decorated with geometric motifs along their upper walls and topped with sawtooth-shaped merlons.[7][87] The traditionaltighremt in the countryside ranges in size from a small fortified farmhouse to a large dominant structure placed on high ground, intended to assert the power of a local ruler or governor.[115]: 60 Prominent kasbahs of this kind include examples such as the Kasbah Telouet,Kasbah Amridil,Tamnougalt, and Kasbah Taourirt inOuarzazate.

Agadirs were fortified granaries typically found in the desert, mountain, and oases regions of southern and eastern Morocco. They are one of the architectural types associated in particular with Amazigh architecture in North Africa. These structures typically consist of a solid outer stone wall, sometimes with fortification towers, inside of which are lines of small storage rooms.[7][87]
The termqsūr orqsars (also commonly spelledksar orksour) is used to denote fortified villages in the desert, mountain, and oases regions of Morocco. These complexes are also associated with Amazigh architecture and are known asigherm in Amazigh languages.[7][115] They are typically surrounded by a defensive wall reinforced with towers, again built out of rammed earth, mud-brick and/or stone. The perimeter wall typically has just one gate, with most public buildings located near this gate.[87] The core of aqsur origherm is often atighremt or kasbah, a "dominant" house that towers over the other houses of the settlement. In some cases, thetighremt started out as an isolated fortified house and then became the nucleus of a growing settlement as new inhabitants built smaller houses around it.[115]: 60 Aït Benhaddou is one famous example of a preservedqsar settlement, complete with a tall kasbah near its entrance and anagadir up on a hilltop.[89][142]

Aborj (Arabic:برج) generally referred to a single fort, tower, or bastion, such as theBorj Nord in Fes.[28][97] Asqala (Arabic:سقالة) was another type of bastion, often a seaside fortification with a platform for canons, like the Sqala ofEssaouira or that of the Udayas Kasbah in Rabat.[143][144][4] Aribat (Arabic:رِبَـاط) usually referred to a countryside or frontier fortress ostensibly used by warriors fighting wagingjihad on the edge of Islamic territory, though it also referred to a type of fortified "monastery" or spiritual retreat forSufi adherents, not unlike azawiya.[2] A notable example, from an architectural point of view, is the Ribat of Tit south ofEl Jadida, which was originally constructed by one family in the 12th century.[2] (Also notably, the name of the city ofRabat derives from its original nameRibat al-Fath.[30])