# Moorish architecture

Moorish architecture is a style within Islamic architecture which developed in the western Islamic world, including al-Andalus (on the Iberian peninsula) and what is now Morocco, Algeria, and Tunisia (part of the Maghreb). Scholarly references on Islamic architecture often refer to this architectural tradition in terms such as architecture of the Islamic West or architecture of the Western Islamic lands. The use of the term "Moorish" comes from the historical Western European designation of the Muslim inhabitants of these regions as "Moors". Some references on Islamic art and architecture consider this term to be outdated or contested.
This architectural tradition integrated influences from pre-Islamic Roman, Byzantine, and Visigothic architectures, from ongoing artistic currents in the Islamic Middle East, and from North African Berber traditions. Major centers of artistic development included the main capitals of the empires and Muslim states in the region's history, such as Córdoba, Kairouan, Fes, Marrakesh, Seville, Granada and Tlemcen. While Kairouan and Córdoba were some of the most important centers during the 8th to 10th centuries, a wider regional style was later synthesized and shared across the Maghreb and al-Andalus thanks to the empires of the Almoravids and the Almohads, which unified both regions for much of the 11th to 13th centuries. Within this wider region, a certain difference remained between architectural styles in the more easterly region of Ifriqiya (roughly present-day Tunisia) and a more specific style in the western Maghreb (present-day Morocco and western Algeria) and al-Andalus, sometimes referred to as Hispano-Moresque or Hispano-Maghrebi.$^{:viii–ix}$$^{:121,155}$
This architectural style came to encompass distinctive features such as the horseshoe arch, riad gardens (courtyard gardens with a symmetrical four-part division), square (cuboid) minarets, and elaborate geometric and arabesque motifs in wood, stucco, and tilework (notably zellij). Over time, it made increasing use of surface decoration while also retaining a tradition of focusing attention on the interior of buildings rather than their exterior. Unlike Islamic architecture further east, western Islamic architecture did not make prominent use of large vaults and domes.$^{:11}$
Even as Muslim rule ended on the Iberian Peninsula, the traditions of Moorish architecture continued in North Africa as well as in the Mudéjar style in Spain, which adapted Moorish techniques and designs for Christian patrons. In Algeria and Tunisia local styles were subjected to Ottoman influence and other changes from the 16th century onward, while in Morocco the earlier Hispano-Maghrebi style was largely perpetuated up to modern times with fewer external influences.$^{:243–245}$ In the 19th century and after, the Moorish style was frequently imitated in the form of Neo-Moorish or Moorish Revival architecture in Europe and America, including Neo-Mudéjar in Spain. Some scholarly references associate the term "Moorish" or "Moorish style" more narrowly with this 19th-century trend in Western architecture.

## Historical development
### Earliest Islamic monuments (8th–9th centuries)

In the 7th century the region of North Africa became steadily integrated into the emerging Muslim world during the Early Arab-Muslim Conquests. The territory of Ifriqiya (roughly present-day Tunisia), and its newly founded capital city of Kairouan (also transliterated as "Qayrawan") became an early center of Islamic culture for the region. According to tradition, the Great Mosque of Kairouan was founded here by Uqba ibn Nafi in 670, although the current structure dates from later.$^{:28}$

#### Al-Andalus

In 711 most of the Iberian Peninsula, part of the Visigothic Kingdom at the time, was conquered by a Muslim (largely Berber) army led by Tariq ibn Ziyad and became known as Al-Andalus. The city of Cordoba became its capital. In 756 Abd ar-Rahman I established the independent Emirate of Cordoba here and in 785 he also founded the Great Mosque of Cordoba, one of the most important architectural monuments of the western Islamic world. The mosque was notable for its vast hypostyle hall composed of rows of columns connected by double tiers of arches (including horseshoe arches on the lower tier) composed of alternating red brick and light-colored stone. The mosque was subsequently expanded by Abd ar-Rahman II in 836, who preserved the original design while extending its dimensions. The mosque was again embellished with new features by his successors Muhammad, Al-Mundhir, and Abdallah. One of the western gates of the mosque, known as Bab al-Wuzara' (today known as Puerta de San Esteban), dates from this period and is often noted as an important prototype of later Moorish architectural forms and motifs: the horseshoe arch has voussoirs that alternate in colour and decoration and the arch is set inside a decorative rectangular frame (alfiz). The influence of ancient Classical architecture is strongly felt in the Islamic architecture during this early Emirate period of the peninsula.$^{:48}$ The most obvious example of this was the reuse of columns and capitals from earlier periods in the initial construction of the Great Mosque of Cordoba. When new, richly-carved capitals were produced for the mosque's 9th-century expansion, they emulated the form of classical Corinthian capitals.$^{:88}$
In Seville, the Mosque of Ibn Adabbas was founded in 829 and was considered the second-oldest Muslim building in Spain (after the Great Mosque of Cordoba) until it was demolished in 1671. This mosque had a hypostyle form consisting of eleven aisles divided by rows of brick arches supported on marble columns.$^{:144–145}$ Of the brief Muslim presence in southern France during the 8th century, only a few funerary stelae have been found. In 1952 French archaeologist Jean Lacam excavated the Cour de la Madeleine ('Courtyard of Madeline') in the Saint-Rustique Church [fr] in Narbonne, where he discovered remains which he interpreted as the remains of a mosque from the 8th-century Muslim occupation of Narbonne.

#### Ifriqiya

In Ifriqiya, the Ribat of Sousse and the Ribat of Monastir are two military structures dated to the late 8th century, making them the oldest surviving Islamic-era monuments in Tunisia – although subjected to later modifications.$^{:25}$ The Ribat of Sousse contains a small vaulted room with a mihrab (niche symbolizing the direction of prayer) which is the oldest preserved mosque or prayer hall in North Africa. Another small room in the fortress, located above the front gate, is covered by a dome supported on squinches, which is the oldest example of this construction technique in Islamic North Africa.$^{:25}$ The tall cylindrical tower inside the ribat, most likely intended as a lighthouse, has a marble plaque over its entrance inscribed with the name of Ziyadat Allah I and the date 821, which in turn is the oldest Islamic-era monumental inscription to survive in Tunisia.$^{:25–26}$
In the 9th century Ifriqiya was controlled by the Aghlabid dynasty, who ruled nominally on behalf of the Abbasid Caliphs in Baghdad but were de facto autonomous. The Aghlabids were major builders and erected many of Tunisia's oldest Islamic religious buildings and practical infrastructure works like the Aghlabid Reservoirs of Kairouan. Much of their architecture, even their mosques, had a heavy and almost fortress-like appearance, but they nonetheless left an influential artistic legacy.$^{:9–61}$$^{:21–41}$
One of the most important Aghlabid monuments is the Great Mosque of Kairouan, which was completely rebuilt in 836 by the emir Ziyadat Allah I (r. 817–838), although various additions and repairs were effected later which complicate the chronology of its construction.$^{:28–32}$ Its design was a major reference point in the architectural history of mosques in the Maghreb.$^{:273}$ The mosque features an enormous rectangular courtyard, a large hypostyle prayer hall, and a thick three-story minaret (tower from which the call to prayer is issued). The prayer hall's layout reflects an early use of the so-called "T-plan", in which the central nave of the hypostyle hall (the one leading to the mihrab) and the transverse aisle running along the qibla wall are wider than the other aisles and intersect in front of the mihrab. The mihrab of the prayer hall is among the oldest examples of its kind, richly decorated with marble panels carved in high-relief vegetal motifs and with ceramic tiles with overglaze and luster.$^{:30}$ Next to the mihrab is the oldest surviving minbar (pulpit) in the world, made of richly-carved teakwood panels. Both the carved panels of the minbar and the ceramic tiles of the mihrab are believed to be imports from Abbasid Iraq.$^{:30–32}$ An elegant dome in front of the mihrab with an elaborately-decorated drum is one of architectural highlights of this period. Its light construction contrasts with the bulky structure of the surrounding mosque and the dome's drum is elaborately decorated with a frieze of blind arches, squinches carved in the shape of shells, and various motifs carved in low-relief.$^{:30–32}$ The mosque's minaret is the oldest surviving one in North Africa and the western Islamic world. Its form was modeled on older Roman lighthouses in North Africa, quite possibly the lighthouse at Salakta (Sullecthum) in particular.$^{:32}$$^{:138}$
The Great Mosque of al-Zaytuna in Tunis, which was founded earlier around 698, owes its overall current form to a reconstruction during the reign of the Aghlabid emir Abu Ibrahim Ahmad (r. 856–863). Its layout is very similar to the Great Mosque of Kairouan.$^{:38–41}$ Two other congregational mosques in Tunisia, the Great Mosque of Sfax (circa 849) and the Great Mosque of Sousse (851), were also built by the Aghlabids but have different forms.$^{:36–37}$ The small Mosque of Ibn Khayrun in Kairouan (also known as the "Mosque of the Three Doors"), dated to 866 and commissioned by a private patron, possesses what is considered by some to be the oldest decorated external façade in Islamic architecture, featuring carved Kufic inscriptions and vegetal motifs. Apart from its limestone façade, most of the mosque was rebuilt at a later period.$^{:33–34}$ Another small local mosque from this period is the Mosque of Bu Fatata in Sousse, dated to the reign of Abu Iqal al-Aghlab ibn Ibrahim (r. 838–841), which has a hypostyle prayer hall fronted by an external portico of three arches. Both the Ibn Khayrun and Bu Fatata mosques are early examples of the "nine-bay" mosque, meaning that the interior has a square plan subdivided into nine smaller square spaces, usually vaulted, arranged in three rows of three. This type of layout is found later in al-Andalus and as far as Central Asia, suggesting that it may be a design that was disseminated widely by Muslim pilgrims returning from Mecca.$^{:33–34}$

#### Western and central Maghreb

Further west, the Rustamid dynasty, who were Ibadi Kharijites and did not recognize the Abbasid Caliphs, held sway over much of the central Maghreb. Their capital, Tahart (near present-day Tiaret), was founded in the second half of the 8th century by Abd al-Rahman ibn Rustam and was occupied seasonally by its semi-nomadic inhabitants. It was destroyed by the Fatimids in 909 but its remains were excavated in the 20th century.$^{:41}$ The city was surrounded by a fortified wall interspersed with square towers. It contained a hypostyle mosque, a fortified citadel on higher ground, and a palace structure with a large courtyard similar to the design of traditional houses.$^{:41}$$^{:13–14}$
The Islamization of present-day Morocco, the westernmost territory of the Muslim world (known as the Maghreb al-Aqsa), became more definitive with the advent of the Idrisid dynasty at the end of the 8th century. The Idrisids founded the city of Fes, which became their capital and the major political and cultural center of early Islamic Morocco. In this early period Morocco also absorbed waves of immigrants from Tunisia and al-Andalus who brought in cultural and artistic influences from their home countries. The well-known Qarawiyyin and Andalusiyyin mosques in Fes, founded in the 9th century during, were built in hypostyle form but the structures themselves were rebuilt during later expansions.$^{:197–198,211–212}$$^{:9–11}$$^{:9}$$^{:42}$ The layout of two other mosques from this era, the Mosque of Agadir and the Mosque of Aghmat, are known thanks to modern archeological investigations. The Mosque of Agadir was founded in 790 by Idris I on the site of the former Roman town of Pomeria (present-day Tlemcen in Algeria), while the Mosque of Aghmat, a town about 30 km southeast of present-day Marrakesh, was founded in 859 by Wattas Ibn Kardus. Both of them were also hypostyle mosques with prayer halls supported by rows of pillars.$^{:42–43}$

### The rival caliphates (10th century)
#### The Caliphate of Córdoba

In the 10th century Abd ar-Rahman III declared a new Caliphate in al-Andalus and inaugurated the height of Andalusi power in the region. He marked this political evolution with the creation of a vast and lavish palace-city called Madinat al-Zahra, located just outside Cordoba on the lower slopes of the Sierra Morena. Its construction started in 936 and continued for decades during his reign and that of his son.$^{:61–68}$ The site was later destroyed and pillaged after the end of the Caliphate, but its remains have been excavated since 1911. The site covers a vast area divided into three terraced levels: the highest level contained the caliph's palaces, the level below this contained official buildings and dwellings of high officials, and the lowest and largest level was inhabited by common workers, craftsmen, and soldiers.$^{:63}$ The most lavish building discovered so far, known today as the Salón Rico ("Rich Hall" in Spanish), is the reception hall of Abd ar-Rahman III, which is fronted by sunken gardens and reflective pools on a terrace overlooking the landscape below. Its main hall is a rectangular space divided into three naves by two rows of horseshoe arches and nearly every wall surface is covered in exceptional stone-carved decoration with geometric and tree of life motifs.$^{:33–34}$ While garden estates were built by the Umayyad rulers and elites of Cordoba before this, the gardens of Madinat al-Zahra are the oldest archeologically documented example of geometrically divided gardens (related to the chahar bagh type) in the western Islamic world, among the oldest examples in the Islamic world generally, and the oldest known example to combine this type of garden with a system of terraces.$^{:45–47}$$^{:69–70}$
Andalusi decoration and craftsmanship of this period became more standardized. While Classical inspirations are still present, they are interpreted more freely and are mixed with influences from the Middle East, including ancient Sasanian or more recent Abbasid motifs. This is seen for example in the stylized vegetal motifs intricately carved onto limestone panels on the walls at Madinat al-Zahra.$^{:121–124}$$^{:103–104}$ It is also at Madinat al-Zahra that the "caliphal" style of horseshoe arch was formalized: the curve of the arch forms about three quarters of a circle, the voussoirs are aligned with the imposts rather than the center of the arch, the curve of the extrados is "stilted" in relation to that of the intrados, and the arch is set within a decorative alfiz.$^{:33}$$^{:57}$ Back in Cordoba itself, Abd ar-Rahman III also expanded the courtyard (sahn) of the Great Mosque and built its first true minaret. The minaret, with a cuboid shape about 47 metres (154 ft) tall, became the model followed for later minarets in the region.$^{:61–63}$ Abd ar-Rahman III's cultured son and successor, al-Hakam II, further expanded the mosque's prayer hall, starting in 962. He endowed it with some of its most significant architectural flourishes and innovations, which included a maqsura enclosed by intersecting multifoil arches, four ornate ribbed domes, and a richly-ornamented mihrab with Byzantine-influenced gold mosaics.$^{:139–151}$$^{:70–86}$
A much smaller but notable work from the late caliphate period is the Bab al-Mardum Mosque (now known as the Church of San Cristo de la Luz) in Toledo, which has a nine-bay layout covered by a variety of ribbed domes and an exterior façade with an Arabic inscription carved in brick. Other monuments from the Caliphate period in al-Andalus include some of Toledo's old city gates (e.g. Puerta de Bisagra), the former mosque (and later monastery) of Almonaster la Real, the Castle of Tarifa, the Burgalimar Castle, the Caliphal Baths of Cordoba, and, possibly, the Baths of Jaen.$^{:88–103}$
In the 10th century much of northern Morocco also came directly within the sphere of influence of the Umayyad Caliphate of Cordoba, with competition from the Fatimid Caliphate further east. Early contributions to Moroccan architecture from this period include expansions to the Qarawiyyin and Andalusiyyin mosques in Fes and the addition of their square-shafted minarets, carried out under the sponsorship of Abd ar-Rahman III and following the example of the minaret he built for the Great Mosque of Cordoba.$^{:199,212}$

#### The Fatimid Caliphate

In Ifriqiya, the Fatimids also built extensively, most notably with the creation of a new fortified capital on the coast, Mahdia. Construction began in 916 and the new city was officially inaugurated on 20 February 921, although some construction continued.$^{:47}$ In addition to its heavy fortified walls, the city included the Fatimid palaces, an artificial harbor, and a congregational mosque (the Great Mosque of Mahdia). Much of this has not survived to the present day. Fragments of mosaic pavements from the palaces have been discovered from modern excavations.$^{:48}$ The mosque is one of the most well-preserved Fatimid monuments in the Maghreb, although it too has been extensively damaged over time and was in large part reconstructed by archeologists in the 1960s.$^{:49}$ It consists of a hypostyle prayer hall with a roughly square courtyard. The mosque's original main entrance, a monumental portal projecting from the wall, was relatively unusual at the time and may have been inspired by ancient Roman triumphal arches. Another unusual feature was the absence of a minaret, which may have reflected an early Fatimid rejection of such structures as unnecessary innovations.$^{:49–51}$
In 946 the Fatimids began construction of a new capital, al-Mansuriyya, near Kairouan. Unlike Mahdia, which was built with more strategic and defensive considerations in mind, this capital was built as a display of power and wealth. The city had a round layout with the caliph's palace at the center, possibly modeled on the Round City of Baghad. While only sparse remains of the city have been uncovered, it appears to have differed from earlier Fatimid palaces in its extensive use of water. One excavated structure had a vast rectangular courtyard mostly occupied by a large pool. This use of water was reminiscent of earlier Aghlabid palaces at nearby Raqqada and of contemporary palaces at Madinat al-Zahra, but not of older Umayyad and Abbasid palaces further east, suggesting that displays of waterworks were evolving as symbols of power in the Maghreb and al-Andalus.$^{:58–61}$

### Political fragmentation (11th century)
#### The Taifas in Al-Andalus

The collapse of the Cordoban caliphate in the early 11th century gave rise to the first Taifas period, during which al-Andalus was politically fragmented into a number of smaller kingdoms. The disintegration of central authority resulted in the ruin and pillage of Madinat al-Zahra. Despite this political decline, the culture of the Taifa emirates was vibrant and productive, with the architectural forms of the Caliphate period continuing to evolve. A number of important palaces or fortresses, in various cities, were begun or expanded by local dynasties. The Alcazaba of Malaga, begun in the early 11th century and subsequently modified, is one of the most important examples. The earliest part of the palace features horseshoe arches with carved vegetal decoration that appear to imitate, with less sophistication, the style of Madinat al-Zahra. Another part contains intersecting multifoil arches that resemble those of al-Hakam II's maqsura in the Cordoba mosque, though serving a purely decorative and non-structural purpose here.$^{:154}$$^{:53–55}$ The Alcazar of Seville and the Alcazaba of the Alhambra were also the site of earlier fortresses or palaces by the Abbadids (in Seville) and the Zirids (in Granada), respectively.$^{:127}$ The Alcazaba of Almería, along with a preserved section of Almería's defensive walls, dates from the 11th century, though little remains of the palaces built inside the Alcazaba.$^{:124}$ The Bañuelo of Granada, another historic Islamic bathhouse, is also traditionally dated to the 11th century, though recent studies suggest it may date from slightly later, the 12th century.
The Aljaferia Palace in Zaragoza, though much restored in modern times, is one of the most significant and best-preserved examples of this period, built during the second half of the 11th century by the Banu Hud. Inside its enclosure of fortified walls, one courtyard has been preserved from this period, occupied by pools and sunken gardens and wide rectangular halls fronted by porticos at either end. The arches of this courtyard have elaborate intersecting and mixed-linear designs and intricately-carved stucco decoration. The carved stucco of the southern portico, enveloping a simple brick core, is especially dizzying and complex, drawing on the forms of plain and multifoil arches but manipulating them into motifs outside their normal structural logic. Next to the northern hall of the courtyard, which was probably al-Muqtadir's audience hall, is an unusual small octagonal room with a mihrab, most likely a private oratory for the ruler. The designs and decoration of the palace appear to be a further elaboration of 10th-century Cordoban architecture, in particular al-Hakam II's extension in the Mosque of Cordoba, and of the Taifa-period aesthetic that followed it.$^{:95–98}$$^{:56–59}$ Remains of another palace at Balaguer, further east in Catalonia today, are contemporary with the Aljaferia. Fragments of stucco decoration found here show that it was built in a very similar style. However, they also include rare surviving examples of figural sculpture in western Islamic architectural decoration, such as the carved image of a tree occupied by birds and harpies.$^{:98}$

#### Zirids and Hammadids in North Africa

In North Africa, new Berber dynasties such as the Zirids ruled on behalf of the Fatimids, who had moved their base of power to Cairo in the late 10th century. The Zirid palace at 'Ashir (near the present town of Kef Lakhdar in Algeria) was built in 934 by Ziri ibn Manad while in the service of the Fatimid caliph al-Qa'im. It is one of the oldest palaces in the Maghreb to have been discovered and excavated.$^{:53}$ It was built in stone and has a carefully-designed symmetrical plan which included a large central courtyard and two smaller courtyards in each of the side wings of the palace. Some scholars believe this design imitated the now-lost Fatimid palaces of Mahdia.$^{:67}$ As independent rulers, however, the Zirids of Ifriqiya built relatively few grand structures. They reportedly built a new palace at al-Mansuriyya, a former Fatimid capital near Kairouan, but it has not been found by archeologists.$^{:123}$ In Kairouan itself the Great Mosque was restored by Al-Mu'izz ibn Badis. The wooden maqsura within the mosque today is believed to date from this time.$^{:87}$ It is the oldest maqsura in the Islamic world to be preserved in situ and was commissioned by al-Mu῾izz ibn Badis in the first half of the 11th century (though later restored). It is notable for its woodwork, which includes an elaborately carved Kufic inscription dedicated to al-Mu'izz. The Qubbat al-Bahw, an elegant dome at the entrance of the prayer hall of the Zaytuna Mosque in Tunis, dates from 991 and can be attributed to Al-Mansur ibn Buluggin.$^{:86–87}$
The Hammadids, an offshoot of the Zirids, ruled in the central Maghreb (present-day Algeria) during the 11th and 12th centuries. They built an entirely new fortified capital known as Qal'at Bani Hammad, founded in 1007. Although abandoned and destroyed in the 12th century, the city has been excavated by modern archeologists and the site is one of the best-preserved medieval Islamic capitals in the world. It contains several palaces, various amenities, and a grand mosque, in an arrangement that bears similarities to other palace-cities such as Madinat al-Zahra.$^{:125–126}$$^{:88–93}$ The largest palace, Qasr al-Bahr ("Palace of the Sea"), was built around an enormous rectangular water basin. The architecture of the site has been compared to Fatimid architecture, but bears specific resemblances to contemporary architecture in the western Maghreb, Al-Andalus, and Arab-Norman Sicily. For example, while the Fatimids usually built no minarets, the grand mosque of Qal'at Bani Hammad has a large square-based minaret with interlacing and polylobed arch decoration, which are features of architecture in al-Andalus.$^{:88–93}$ Various remnants of tile decoration have been discovered at the site, including the earliest known use of glazed tile decoration in western Islamic architecture.$^{:91–93}$ Archeologists also discovered fragments of plaster which have been identified by some as the earliest appearance of muqarnas ("stalactite" or "honeycomb" sculpting) in the western Islamic world,$^{:133}$ but their identification as true muqarnas has been questioned or rejected by some other scholars.$^{:93}$

### The Berber Empires (11th–13th centuries)

The late 11th century saw the significant advance of Christian kingdoms into Muslim al-Andalus, particularly with the fall of Toledo to Alfonso VI of Castile in 1085, and the rise of major Berber empires originating in northwestern Africa. The latter included first the Almoravids (11th–12th centuries) and then the Almohads (12th–13th centuries), both of whom created empires that stretched across large parts of western and northern Africa and took over the remaining Muslim territories of al-Andalus in Europe. Both empires had their capital at Marrakesh, which was founded by the Almoravids in the second half of the 11th century. This period is one of the most formative stages of architecture in al-Andalus and the Maghreb, establishing many of the forms and motifs that were refined in subsequent centuries.

#### Almoravids

The Almoravids made use of Andalusi craftsmen throughout their realms, thus helping to spread the highly ornate architectural style of al-Andalus to North Africa.$^{:115–119}$$^{:26–30}$ Almoravid architecture assimilated the motifs and innovations of Andalusi architecture, such as the complex interlacing arches of the Great Mosque in Cordoba and of the Aljaferia palace in Zaragoza, but it also introduced new ornamental techniques from the east, such as muqarnas, and added its own innovations, such as the lambrequin arch and the use of pillars instead of columns in mosques.$^{:26–30}$ Stucco-carved decoration began to appear more and more as part of these compositions and would become even more elaborate in subsequent periods.$^{:155}$ Almoravid patronage thus marks a period of transition for architecture in the region, setting the stage for future developments.$^{:30}$
Some of the oldest and most significant surviving examples of Almoravid religious architecture, although with later modifications, are the Great Mosque of Algiers (1096–1097), the Great Mosque of Tlemcen (1136), and the Great Mosque of Nedroma (1145), all located in Algeria today. The highly ornate, semi-transparent plaster dome in front of the mihrab of the Great Mosque of Tlemcen, dating from the reign of Ali ibn Yusuf (r. 1106–1143), is one of the highlights of this period. The design of the dome traces its origins to the earlier ribbed domes of Al-Andalus and, in turn, it probably influenced the design of similar ornamental domes in later mosques in Fez and Taza.$^{:116}$
In Morocco, the only notable remnants of Almoravid religious architecture are the Qubba Ba'adiyyin, a small but highly ornate ablutions pavilion in Marrakesh, and the Almoravid expansion of the Qarawiyyin Mosque in Fez. These two monuments also contain the earliest clear examples of muqarnas decoration in the region, with the first complete muqarnas vault appearing in the central nave of the Qarawiyyin Mosque.$^{:114–120}$ The Almoravid palace of Ali Ibn Yusuf in Marrakesh, excavated in the 20th century, contains the earliest known example of a riad garden (an interior garden symmetrically divided into four parts) in Morocco.$^{:71}$$^{:404}$
In present-day Spain, the oldest surviving muqarnas fragments were found in a palace built by Muhammad Ibn Mardanish, the independent ruler of Murcia (1147–1172). The remains of the palace, known as al-Qasr al-Seghir (or Alcázar Seguir in Spanish) are part of the present-day Monastery of Santa Clara in Murcia. The muqarnas fragments are painted with images of musicians and other figures.$^{:98–100}$ Ibn Mardanish also constructed what is now known as the Castillejo de Monteagudo, a hilltop castle and fortified palace outside the city that is one of the best-preserved examples of Almoravid-era architecture in the Iberian Peninsula. It has a rectangular plan and contained a large riad garden courtyard with symmetrical reception halls facing each other across the long axis of the garden.$^{:98–100}$

#### Almohads

Almohad architecture showed more restraint than Almoravid architecture in its use of ornamental richness, giving greater attention to wider forms, contours, and overall proportions. Earlier motifs were refined and were given a grander scale. While surface ornament remained important, architects strove for a balance between decorated surfaces and empty spaces, allowing the interaction of light and shadows across carved surfaces to play a role.$^{:86–88}$
The Almohad Kutubiyya and Tinmal mosques are often considered the prototypes of medieval mosque architecture in the region. The so-called "T-plan", combined with a hierarchical use of decoration that emphasizes the wider central and transverse qibla aisles of the mosque, became an established feature of this architecture.$^{:128,147}$ The monumental minarets of the Kutubiyya Mosque, the Giralda of the Great Mosque of Seville (now part of the city's cathedral), and the Hassan Tower of Rabat, as well as the ornamental gateways of Bab Agnaou in Marrakesh and Bab Oudaia and Bab er-Rouah in Rabat, were all models that established the overall decorative schemes that became recurrent in these architectural elements from then on. The minaret of the Kasbah Mosque of Marrakesh, with its façades covered by sebka motifs and glazed tile, was particularly influential and set a style that was repeated, with minor elaborations, in the following period under the Marinids and other dynasties.$^{:147}$
The Almohad caliphs constructed their own palace complexes in several cities. They founded the Kasbah of Marrakesh in the late 12th century as their main residence, imitating earlier examples of self-contained palace-cities such as Madinat al-Zahra in the 10th century. The Almohads also made Tunis the regional capital of their territories in Ifriqiya (present-day Tunisia), establishing the city's own kasbah (citadel). The caliphs also constructed multiple country estates and gardens right outside some of these cities, continuing a tradition that existed under the Almoravids.$^{:196–212}$ These estates were typically centered around a large artificial water reservoir that sustained orchards of fruit trees and other plants, while small palaces or pleasure pavilions were built along the water's edge. In Marrakesh, the present-day Agdal and Menara gardens both developed from such Almohad creations. In Seville, the remains of the Almohad al-Buḥayra garden, founded in 1171, were excavated in the 1970s.$^{:196–212}$ Sunken gardens were also part of Almohad palace courtyards. In some cases the gardens were divided symmetrically into four parts, much like a riad garden. Examples of these have been found in some courtyards of the Alcázar of Seville, where the former Almohad palaces once stood.$^{:199–210}$$^{:70–71}$

### Arab-Norman architecture in Sicily (11th-12th centuries)

Sicily was progressively brought under Muslim control in the 9th when the Aghlabids conquered it from the Byzantines. The island was subsequently settled by Arabs and Berbers from North Africa. In the following century the island passed into the control of the Fatimids, who left the island under the governorship of the Kalbids. By the mid-11th century the island was fragmented into smaller Muslim states and by the end of that century the Normans had conquered it under the leadership of Robert Guiscard and Roger de Hauteville (Roger I).
Virtually no examples of architecture from the period of the Emirate of Sicily have survived today. However, the following period of Norman domination, especially under Roger II in the 12th century, was notable for its unique blending of Norman, Byzantine and Arab-Islamic cultures. Multiple examples of this "Arab-Norman" architecture – which was also heavily influenced by Byzantine architecture – have survived today and are even classified together as a UNESCO World Heritage Site (since 2015). While the Arab-Islamic elements of this architecture are closely linked to Fatimid architecture, they also come from Moorish architecture and are stylistically similar to the preceding Almoravid period.
The Palazzo dei Normanni (Palace of the Normans) in Palermo contains the Cappella Palatina, one of the most important masterpieces of this style, built under Roger II in the 1130s and 1140s. It combines harmoniously a variety of styles: the Norman architecture and door decor, the Arabic arches and scripts adorning the roof, the Byzantine dome and mosaics. The central nave of the chapel is covered by a large rectangular vault ceiling made of painted wood and carved in muqarnas: the largest rectangular muqarnas vault of its kind.

### Marinids, Nasrids, and Zayyanids (13th–15th centuries)

The eventual collapse of the Almohad Empire in the 13th century was precipitated by its defeat at the Battle of Las Navas de Tolosa (1212) in al-Andalus and by the advance of the Berber Marinid dynasty in the western Maghreb, the Zayyanids in the central Maghreb, and the Hafsids in Ifriqiya. What remained of the Muslim-controlled territories in al-Andalus was consolidated by the Nasrid dynasty into the Emirate of Granada, which lasted another 250 years until its final conquest by the Catholic Monarchs in 1492, at the end of the Reconquista. Both the Nasrids in al-Andalus to the north and the Marinids in Morocco to the south were important in further refining the artistic legacy established by their predecessors. When Granada was conquered in 1492 by Catholic Spain and the last Muslim realm of al-Andalus came to an end, many of the remaining Spanish Muslims (and Jews) fled to Morocco and other parts of North Africa, further increasing the Andalusian influence in these regions in subsequent generations.
The architectural styles of the Marinids, Zayyanids, and Nasrids were very similar to each other. Craftsmen probably travelled between royal courts and from region to region, resulting in mutual influences between the arts of the three kingdoms.$^{:177}$ Compared with the relatively restrained decoration of Almohad architecture, the monuments of all three dynasties during this period are marked by increasingly extensive and intricate decoration on every surface, particularly in wood, stucco, and zellij (mosaic tilework in complex geometric patterns).$^{:149}$ Some differences are still found between the styles of each dynasty, such as the wider use of marble columns in Nasrid palaces and the increasing use of wooden elements in Marinid architecture.$^{:159}$ Nasrid architecture also exhibits details influenced by Granada's closer interactions with Christian kingdoms like Castile.$^{:212}$
The Marinids, who chose Fes as their capital, were also the first to build madrasas in this region, a type of institution which originated in Iran and had spread west. The madrasas of Fes, such as the Bou Inania, al-Attarine, and as-Sahrij madrasas, as well as the Marinid madrasa of Salé and the other Bou Inania in Meknes, are considered among the greatest architectural works of this period. The Marinids also imitated previous dynasties by founding their own fortified palace-city to the west of Fes, known afterwards as Fes el-Jdid ("New Fez"), which remained a frequent center of power in Morocco even during later dynasties such as the 'Alawis. Unlike the Alhambra of Granada, the grand palaces of Fes el-Jdid have not survived, though they may have been comparable in splendor. The Great Mosque of Fes el-Jdid, on the other hand, is one of the major Marinid mosques that is still well-preserved today, while numerous other mosques were built throughout Fes and in other cities during this period, including the Lalla az-Zhar Mosque in Fes, the Ben Salah Mosque in Marrakesh, the Zawiya an-Nussak in Salé, the Great Mosque of Oujda, and others.
The most famous architectural legacy of the Nasrids in Granada is the Alhambra, a hilltop palace district protected by heavy fortifications and containing some of the most famous and best-preserved palaces of western Islamic architecture. Initially a fortress built by the Zirids in the 11th century (corresponding to the current Alcazaba), it was expanded into a self-contained and well-fortified palace district complete with habitations for servants and workers. The oldest remaining palace there today, built under Muhammad III (ruled 1302–1309), is the Palacio del Partal which, although only partly preserved, demonstrates the typical layout which would be repeated in other palaces nearby: a courtyard centered on a large reflective pool with porticos at either end and a mirador (lookout) tower at one end which looked down on the city from the edge of the palace walls. The most famous palaces, the Comares Palace and the Palace of the Lions, were added afterwards. The Comares Palace, which includes a lavish hammam (bathhouse) and the Hall of the Ambasadors (a throne room), was begun under Isma'il I (ruled 1314–1325) but mostly constructed under Yusuf I (1333–1354) and Muhammad V (ruled 1354–1359 and 1362–1391).$^{:152}$ The Palace of the Lions was built under Muhammad V and possibly finished around 1380.$^{:152}$$^{:142}$ It features a courtyard with a central marble fountain decorated with twelve lion sculptures. The galleries and chambers around the courtyard are notable for their extremely fine stucco decoration and some exceptional muqarnas vault ceilings.$^{:160–163}$ Four other nearby palaces in the Alhambra were demolished at various points after the end of the Reconquista (1492). The summer palace and gardens known as the Generalife were also created nearby – at the end of the 13th century$^{:164}$ or in the early 14th century$^{:204}$ – in a tradition reminiscent of the Almohad-era Agdal Gardens of Marrakesh and the Marinid Royal Gardens of Fes. The Nasrids also built other structures throughout the city – such as the Madrasa and the Corral del Carbón – and left their mark on other structures and fortifications throughout their territory, though not many significant structures have survived intact to the present-day.
Meanwhile, in the former territories of al-Andalus under the control of the Spanish kingdoms of Léon, Castile and Aragon, Andalusi art and architecture continued to be employed for many years as a prestigious style under new Christian patrons, becoming what is known as Mudéjar art (named after the Mudéjars or Muslims under Christian rule). This type of architecture, created by Muslim craftsmen or by other craftsmen following the same tradition, continued many of the same forms and motifs with minor variations. Numerous examples are found in the early churches of Toledo (e.g. the Church of San Román, 13th century), as well as other cities in Aragon such as Zaragoza and Teruel. Among the most famous and celebrated examples is the Alcazar of Seville, which was the former palace of the Abbadids and the Almohads in the city but was rebuilt in by Christian rulers, including Peter the Cruel who added lavish sections in Moorish style starting in 1364 with the help of craftsmen from Granada and Toledo. Other smaller but notable examples in Cordoba include the Chapel of San Bartolomé and the Royal Chapel (Capilla Real) in the Great Mosque (which was converted to a cathedral in 1236). Some surviving 13th and 14th-century Jewish synagogues were also built (or rebuilt) in Mudéjar Moorish style while under Christian rule, such as the Synagogue of Santa Maria la Blanca in Toledo (rebuilt in its current form in 1250), Synagogue of Cordoba (1315), and the Synagogue of El Tránsito (1355–1357).
Further east, in Algeria, the Berber Zayyanid or Abd al-Wadid dynasty controlled their own state and built monuments in their main capital at Tlemcen. Yaghmorasan (r. 1236–1283), the founder of the dynasty, added minarets to the earlier Mosque of Agadir and the Great Mosque of Tlemcen while his successor, Abu Sa'id 'Uthman (r. 1283–1304), founded the Mosque of Sidi Bel Hasan in 1296.$^{:179–184}$ The Zayyanids built other religious foundations in the area, but many have not survived to the present day or have preserved little of their original appearance.$^{:187}$ In addition to mosques, they built the first madrasas in Tlemcen. The Madrasa Tashfiniya, founded by Abu Tashfin I (r. 1318–1337), was celebrated for its rich decoration, including zellij tile decoration with sophisticated arabesque and geometric motifs whose style was repeated in some subsequent Marinid monuments.$^{:187}$$^{:526}$ The Marinids also intermittently occupied Tlemcen in the 14th century and left their mark on the area. During his siege of the city at the beginning of the century, the Marinid leader Abu Ya'qub built a fortified settlement nearby named al-Mansurah, which includes the monumental Mansurah Mosque (begun in 1303, only partly preserved today).$^{:184–186}$ Further east, Abu al-Hasan founded the Mosque of Sidi Bu Madyan in the city in 1338–39.$^{:195}$

### The Hafsids of Tunisia (13th–16th centuries)

In Ifriqiya (Tunisia), the Hafsids, a branch of the Almohad ruling class, declared their independence from the Almohads in 1229 and developed their own state which came to control much of the surrounding region. They were also significant builders, particularly under the reigns of successful leaders like Abu Zakariya (ruled 1229–1249) and Abu Faris (ruled 1394–1434), though not many of their monuments have survived intact to the present-day.$^{:208}$ While Kairouan remained an important religious center, Tunis was the capital and progressively replaced it as the main city of the region and the main center of architectural patronage. Unlike the architecture further west, Hafsid architecture was built primarily in stone (rather than brick or mudbrick) and appears to have featured much less decoration.$^{:208}$ In reviewing the history of architecture in the region, scholar Jonathan Bloom remarks that Hafsid architecture seems to have "largely charted a course independent of the developments elsewhere in the Maghrib [North Africa]".$^{:213}$
The Kasbah Mosque of Tunis was one of the first works of this period, built by Abu Zakariya (the first independent Hafsid ruler) at the beginning of his reign. Its floor plan had noticeable differences from previous Almohad-period mosques but the minaret, completed in 1233, bears very strong resemblance the minaret of the earlier Almohad Kasbah Mosque in Marrakesh. Other foundations from the Hafsid period in Tunis include the Haliq Mosque (13th century) and the al-Hawa Mosque (1375). The Bardo Palace (today a national museum) was also begun by the Hafsids in the 15th century, and is mentioned in historical records for the first time during the reign of Abu Faris.$^{:208}$ The Hafsids also made significant renovations to the much older Great Mosque of Kairouan – renovating its ceiling, reinforcing its walls, and building or rebuilding two of its entrance gates in 1293 – as well as to the al-Zaytuna Mosque in Tunis.$^{:209}$
The Hafsids also introduced the first madrasas to the region, beginning with the Madrasa al-Shamma῾iyya built in Tunis in 1238$^{:209}$ (or in 1249 according to some sources$^{:296}$). This was followed by many others (almost all of them in Tunis) such as the Madrasa al-Hawa founded in the 1250s, the Madrasa al-Ma'ridiya (1282), and the Madrasa al-Unqiya (1341). Many of these early madrasas, however, have been poorly preserved or have been considerably modified in the centuries since their foundation. The Madrasa al-Muntasiriya, completed in 1437, is among the best preserved madrasas of the Hafsid period.$^{:211}$
The Hafsids were eventually supplanted by the Ottomans who took over most of the Maghreb in the 16th century, with the exception of Morocco, which remained an independent kingdom. This resulted in an even greater divergence between the architecture of Morocco to the west, which continued to follow essentially the same Andalusi-Maghrebi traditions of art as before, and the architecture of Algeria and Tunisia to the east, which increasingly blended influences from Ottoman architecture into local designs.

### The Sharifian dynasties in Morocco: Saadians and 'Alawis (16th century and after)

In Morocco, after the Marinids came the Saadian dynasty in the 16th century, which marked a political shift from Berber-led empires to sultanates led by Arab sharifian dynasties. Artistically and architecturally, however, there was broad continuity and the Saadians are seen by modern scholars as continuing to refine the existing Moorish-Moroccan style, with some considering the Saadian Tombs in Marrakesh as one of the apogees of this style. Starting with the Saadians, and continuing with the 'Alawis (their successors and the reigning monarchy of Morocco today), Moroccan art and architecture is portrayed by modern scholars as having remained essentially "conservative"; meaning that it continued to reproduce the existing style with high fidelity but did not introduce major new innovations.
The Saadians, especially under the sultans Abdallah al-Ghalib and Ahmad 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 several major mosques in Marrakesh including the Mouassine Mosque and the Bab Doukkala Mosque, which 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 in Mamluk architecture in Egypt and the külliyes of Ottoman architecture. The Saadians also rebuilt the royal palace complex in the Kasbah of Marrakesh for themselves, where Ahmad al-Mansur constructed the famous El Badi Palace (built between 1578 and 1593) which was known for its superlative decoration and costly building materials including Italian marble.
The 'Alawis, starting with Moulay 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 in recent centuries. Ornate architectural elements from Saadian buildings, most infamously from the lavish El Badi Palace, were also stripped and reused in buildings elsewhere during the reign of Moulay Isma'il (1672–1727). Moulay Isma'il is also notable for having built a vast imperial capital in Meknes, where the remains of his monumental structures can still be seen today. In 1765 Sultan Mohammed ben Abdallah (one of Moulay Isma'il's sons) started the construction of a new port city called Essaouira (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.$^{:241}$$^{:264}$ He hired European architects to design the city, resulting in a relatively unique historic city built by Moroccans but with Western European architecture, particularly in the style of its fortifications. Similar maritime fortifications or bastions, usually called a sqala, were built at the same time in other port cities like Anfa (present-day Casablanca), Rabat, Larache, and Tangier.$^{:409}$ Late sultans were also significant builders. Up until the late 19th century and early 20th century, both the sultans and their ministers continued to build beautiful palaces, many of which are now used as museums or tourist attractions, such as the Bahia Palace in Marrakesh, the Dar Jamaï in Meknes, and the Dar Batha in Fes.

### Ottoman rule in Algeria and Tunisia (16th century and after)

Over the course of the 16th century the central and eastern Maghreb – Algeria, Tunisia, and Libya – came under Ottoman control. Major port cities such as Algiers, Tunis, and Tripoli also became centers of pirate activity, which brought in wealth to local elites but also attracted intrusions by European powers, who occupied and fortified some coastal positions. In the late 17th century and early 18th century, Ottoman control became largely nominal: the Regency of Algiers (Algeria) was de facto ruled by the local deys until the French conquest of 1830, Tunisia was ruled by the Muradid dynasty (after 1602) and the Husaynid dynasty (after 1705), and Libya was ruled by the Qaramanli dynasty until the return of direct Ottoman control in 1835.$^{:215–236}$$^{:144–205}$ Whereas architecture in Morocco remained largely traditional during the same period, architecture in Algeria and Tunisia was blended with Ottoman architecture, especially in the coastal cities where Ottoman influence was strongest. Some European influences were also introduced, particularly through the importation of materials from Italy such as marble.$^{:215}$

#### Tunisia

In Tunis, the Mosque complex of Yusuf Dey, built or begun around 1614–15 by Yusuf Dey (r. 1610–1637), is one of the earliest and most important examples that imported Ottoman elements into local architecture. Its congregational mosque is accompanied by a madrasa, a primary school, fountains, latrines, and even a café, many of which provided revenues for the upkeep of the complex. This arrangement is similar to Ottoman külliye complexes. It was also the first example of a "funerary mosque" in Tunis, as the complex includes the founder's mausoleum, dated to 1639. While the hypostyle form of the mosque and the pyramidal roof of the mausoleum reflect traditional architecture in the region, the minaret's octagonal shaft reflects the influence of the "pencil"-shaped Ottoman minarets. In this period, octagonal minarets often distinguished mosques following the Hanafi maddhab (which was associated with the Ottomans), while mosques which continued to follow the Maliki maddhab (predominant in the Maghreb) continued to employ traditional square-shaft minarets.$^{:219–221}$
The Mosque of Hammuda Pasha, built by Hammuda Pasha (r. 1631–1664) between 1631 and 1654, reprises many of these same elements as the Yusuf Dey Mosque. Both mosques make use of marble columns and capitals that were imported from Italy and possibly even carved by Italian craftsmen in Tunis.$^{:221–224}$ Hammuda Pasha was also responsible for starting in 1629 a major restoration and expansion of the Zawiya of Abu al-Balawi or "Mosque of the Barber" in Kairouan. While the Zawiya has been further modified since, one of its characteristic 17th-century features is the decoration of underglaze-painted Qallalin tiles on many of its walls. These tiles, generally produced in the Qallalin district of Tunis, are painted with motifs of vases, plants, and arches and use predominant blue, green, and ochre-like yellow colours which distinguish them from contemporary Ottoman tiles.$^{:223–224}$ The artistic height of these tiles was in the 17th and 18th centuries.
It wasn't until the end of the 17th century that the first and only Ottoman-style domed mosque in Tunisia was built: the Sidi Mahrez Mosque, begun by Muhammad Bey and completed by his successor, Ramadan ibn Murad, between 1696 and 1699. The mosque's prayer hall is covered by a dome system typical of Classical Ottoman architecture and first employed by Sinan for the Şehzade Mosque (c. 1548) in Istanbul: a large central dome flanked by four semi-domes, with four smaller domes at the corners and pendentives in the transitional zones between the semi-domes. The interior is decorated with marble paneling and Ottoman Iznik tiles.$^{:226–227}$

#### Algeria

During this period Algiers developed into a major town and witnessed regular architectural patronage, and as such most of the major monuments from this period are concentrated there. By contrast, the city of Tlemcen, the former major capital of the region, went into relative decline and saw far less architectural activity.$^{:234–236}$ Mosque architecture in Algiers during this period demonstrates the convergence of multiple influences as well as peculiarities that may be attributed to the innovations of local architects.$^{:238–240}$ Domes of Ottoman influence were introduced into the design of mosques, but minarets generally continued to be built with square shafts instead of round or octagonal ones, thus retaining local tradition, unlike contemporary architecture in Ottoman Tunisia and other Ottoman provinces, where the "pencil"-shaped minaret was a symbol of Ottoman sovereignty.$^{:238}$
The oldest surviving mosque from the Ottoman period in Algeria is the Ali Bitchin (or 'Ali Bitshin) Mosque in Algiers, commissioned by an admiral of the same name, a convert of Italian origin, in 1622.$^{:238}$ The mosque is built on top of a raised platform and was once associated with various annexes including a hospice, a hammam, and a mill. A minaret and public fountain stand on its northeast corner. The interior prayer hall is centered around a square space covered by a large octagonal dome supported on four large pillars and pendentives. This space is surrounded on all four sides with galleries or aisles covered by rows of smaller domes. On the west side of the central space this gallery is two bays deep (i.e. composed of two aisles instead of one), while on the other sides, including on the side of the mihrab, the galleries are just one bay deep.$^{:238}$ Several other mosques in Algiers built from the 17th to early 19th centuries had a similar floor plan.$^{:237–238}$$^{:426–432}$ This particular design was unprecedented in the Maghreb. The use of a large central dome was a clear connection with Ottoman architecture. However, the rest of the layout is quite different from the mosques of metropolitan Ottoman architecture in cities like Istanbul. Some scholars, such as Georges Marçais, suggested that the architects or patrons could have been influenced by Ottoman-era mosques built in the Levantine provinces of the empire, where many of the rulers of Algiers had originated.$^{:238}$$^{:432}$
The most notable monument from this period in Algiers is the New Mosque (Djamaa el Djedid) in Algiers, built in 1660–1661.$^{:239}$$^{:433}$ The mosque has a large central dome supported by four pillars, but instead of being surrounded by smaller domes it is flanked on four sides by wide barrel-vaulted spaces, with small domed or vaulted bays occupying the corners between these barrel vaults. The barrel-vaulted space on the north side of the dome (the entrance side) is elongated, giving the main vaulted spaces of the mosque a cross-like configuration resembling a Christian cathedral.$^{:239–241}$ The mosque's minaret has a traditional form with a square shaft surmounted by a small lantern structure. Its simple decoration includes tilework; the clock faces visible today were added at a later period. The mihrab has a more traditional western Islamic form, with a horseshoe-arch shape and stucco decoration, although the decoration around it is crowned with Ottoman-style half-medallion and quarter-medallion shapes.$^{:239–241}$$^{:433–434}$ The mosque's overall design and its details thus attest to an apparent mix of Ottoman, Maghrebi, and European influences. As the architect is unknown, Jonathan Bloom suggests that it could very well have been a local architect who simply took the general idea of Ottoman mosque architecture and developed his own interpretation of it.$^{:240–241}$

### Beyond the Islamic world

Certain aspects and traditions of Moorish architecture were brought to the Iberian colonies in the Americas. Günter Weimer [pt] outlines the influence of Arab and Amazigh substrates in popular architecture in Brazil, noting the considerable number of architectural terms in Portuguese inherited from Arabic, including muxarabi (مشربية) and açoteia  [pt] (السُطيحة lit. 'little roof').$^{:91–107}$ Elements of Mudéjar architecture, derived from Islamic architectural traditions and assimilated into Spanish architecture, are found in the architecture of the Spanish colonies. The Islamic and Mudéjar style of decorative wooden ceilings, known in Spanish as armadura, proved particularly popular in both Spain and its colonies. Examples of Mudéjar-influenced colonial architecture are concentrated in Mexico and Central America, including some in what is now the southwestern United States.$^{:300}$
Later, particularly in the 19th century, the Moorish Islamic style was frequently imitated by the Neo-Moorish or Moorish Revival style which emerged in the Europe and North America as part of the Romanticist interest in the "Orient". The term "Moorish" or "neo-Moorish" sometimes also covered an appropriation of motifs from a wider range of Islamic architecture. This style was a recurring choice for Jewish synagogue architecture of the era, where it was seen as an appropriate way to mark Judaism's non-European origins. Similar to Neo-Moorish, Néo-Mudéjar was a revivalist style evident in late 19th and early 20th-century Spain and in some Spanish Colonial architecture in northern Morocco. During the French occupation of Algeria, Tunisia, and Morocco, the French colonial administration also encouraged, in some cases, the use of indigenous North African or arabisant ("Arabizing") motifs in new buildings.

## Architectural features
### General characteristics

The architecture of the western Islamic world is exemplified by mosques, madrasas, palaces, fortifications, hammams (bathhouses), funduqs (caravanserais), and other historic building types common to Islamic architecture. Characteristic elements of the western regional style include horseshoe-shaped, intersecting, and polylobed arches, often with voussoirs of alternating colors or patterns, as well as internal courtyards, riad gardens, ribbed domes, and cuboid (square-base) minarets. Decoration typically consists of vegetal arabesques, geometric motifs, muqarnas sculpting, Arabic inscriptions, and epigraphic motifs. These motifs were translated into woodwork, carved stucco, and mosaic tilework known as zellij.$^{:11}$$^{:121,155}$ The nature of the medieval Islamic world encouraged people to travel, which made it possible for artists, craftsmen, and ideas from other parts of the Islamic world to be transmitted here. Some features, such as muqarnas and tile revetments, were transmitted from the east but were realized differently in this region.$^{:11–12}$
As scholar Jonathan Bloom remarks in his introduction to this topic, traditional Islamic-era architecture in the Maghreb and Al-Andalus was in some respects more "conservative" than other regional styles of Islamic architecture, in the sense that these buildings were less structurally ambitious than, for example, the increasingly audacious domed or vaulted structures that developed in Ottoman architecture and Iranian architecture.$^{:10}$ With the exception of minarets, Moorish monuments were rarely very tall and Moorish architecture persisted in using the hypostyle hall – one of the earliest types of structures in Islamic architecture – as the main type of interior space throughout its history. Moreover, Moorish architecture also continued an early Islamic tradition of avoiding ostentatious exterior decoration or exterior monumentality. With the important exception of gateways and minarets, the exteriors of buildings were often very plain, while the interiors were the focus of architectural innovation and could be lavishly decorated. By contrast, architectural styles in the eastern parts of the Islamic world developed significantly different and innovative spatial arrangements in their construction of domed halls or vaulted iwans and featured increasingly imposing and elaborate exteriors that dominated their surroundings.$^{:10}$

### Arches
#### Horseshoe arch

Perhaps the most characteristic arch type of western Islamic architecture generally is the so-called "Moorish" or "horseshoe" arch. This is an arch where the curves of the arch continue downward past the horizontal middle axis of the circle and begin to curve towards each other, rather than just forming a half circle.$^{:15}$ This arch profile became nearly ubiquitous in the region from the very beginning of the Islamic period.$^{:45}$ The origin of this arch appear to date back to the preceding Byzantine period across the Mediterranean, as versions of it appear in Byzantine-era buildings in Cappadocia, Armenia, and Syria. They also appear frequently in Visigothic churches in the Iberian peninsula (5th–7th centuries). Perhaps due to this Visigothic influence, horseshoe arches were particularly predominant afterwards in al-Andalus under the Umayyads of Cordoba, although the "Moorish" arch was of a slightly different and more sophisticated form than the Visigothic arch.$^{:163–164}$$^{:43}$ Arches were not only used for supporting the weight of the structure above them. Blind arches and arched niches were also used as decorative elements. The mihrab of a mosque was almost invariably in the shape of horseshoe arch.$^{:164}$
Starting in the Almoravid period, the first pointed or "broken" horseshoe arches began to appear in the region and became more widespread during the Almohad period. This arch is likely of North African origin, since pointed arches were already present in earlier Fatimid architecture further east.$^{:234}$

#### Polylobed arch

Polylobed (or multifoil) arches, have their earliest precedents in Fatimid architecture in Ifriqiya and Egypt and had also appeared in Andalusi Taifa architecture such as the Aljaferia palace and the Alcazaba of Malaga, which elaborated on the existing examples of al-Hakam II's extension to the Great Mosque of Cordoba. In the Almoravid and Almohad periods, this type of arch was further refined for decorative functions while horseshoe arches continued to be standard elsewhere.$^{:232–234}$ Some early examples appear in the Great Mosque of Tlemcen (in Algeria) and the Mosque of Tinmal.$^{:232}$
* Interlacing polylobed arches at the Alcazaba of Malaga in Spain (11th century)
* Polylobed arches at the Almoravid Qubba in Marrakesh, Morocco (early 12th century)
* Polylobed arches in one of the interior aisles of the Great Mosque of Algiers (11th century or after)
* Polylobed arches in the Mudéjar-style Patio de las Doncellas at the Alcazar of Seville in Spain (14th century)

#### "Lambrequin" arch

The so-called "lambrequin" arch, with a more intricate profile of lobes and points, was also introduced in the Almoravid period, with an early appearance in the funerary section of the Qarawiyyin Mosque (in Fes) dating from the early 12th century.$^{:232}$ It then became common in subsequent Almohad, Marinid, and Nasrid architecture, in many cases used to highlight the arches near the mihrab area of a mosque. This type of arch is also sometimes referred to as a "muqarnas" arch due to its similarities with a muqarnas profile and because of its speculated derivation from the use of muqarnas itself.$^{:232}$ Moreover, this type of arch was indeed commonly used with muqarnas sculpting along the intrados (inner surfaces) of the arch.
* Lambrequin arches in the Mosque of Tinmal (mid-12th century)
* A lambrequin or "muqarnas" arch with muqarnas decoration in the Madrasa al-Attarine, Fes (1323–1325)
* A lambrequin/muqarnas arch (top) in the gallery of the Courtyard of the Lions in the Alhambra, Granada (14th century)
* Lambrequin arches in the Bahia Palace in Marrakesh, Morocco (late 19th century)

### Domes

Although domes and vaulting were not extensively used in western Islamic architecture, domes were still employed as decorative features to highlight certain areas, such as the space in front of the mihrab in a mosque. In the extension of the Great Mosque of Córdoba by al-Hakam II in the late 10th century, three domes were built over the maqsura (the privileged space in front of the mihrab) and another one in the central nave or aisle of the prayer hall at the beginning of the new extension. These domes were constructed as ribbed vaults. Rather than meeting in the centre of the dome, the "ribs" intersect one another off-center, forming a square or an octagon in the centre.
The ribbed domes of the Mosque of Córdoba served as models for later mosque buildings in Al-Andalus and the Maghreb. At around 1000 AD, the Bab al-Mardum Mosque in Toledo was constructed with a similar, eight-ribbed dome, surrounded by eight other ribbed domes of varying design.$^{:79}$ Similar domes are also seen in the mosque building of the Aljafería of Zaragoza. The architectural form of the ribbed dome was further developed in the Maghreb: the central dome of the Great Mosque of Tlemcen, a masterpiece of the Almoravids founded in 1082 and redecorated in 1136, has twelve slender ribs, the shell between the ribs is filled with filigree stucco work.
In Ifriqiya, certain domes from the 9th and 10th centuries, of a quite different style, are also particularly accomplished in their design and decoration. These are the 9th-century (Aghlabid) dome in front of the mihrab in the Great Mosque of Kairouan and the 10th-centuy (Zirid) Qubbat al-Bahw dome in the Al-Zaytuna Mosque in Tunis. Both are elegant ribbed domes with stonework flourishes such as decorative niches, inscriptions, and shell-shaped squinches.$^{:30–32,86–87}$
* The ribbed dome at the beginning of al-Hakam II's extension of the Great Mosque of Cordoba (circa 965)
* The ribbed dome in front of the mihrab of the Great Mosque of Cordoba, covered in mosaics (circa 965)
* Smaller ribbed domes in the Bab al-Mardum Mosque in Toledo (c. 1000)
* Detail of decoration inside the dome before the mihrab of the Great Mosque of Kairouan (circa 836)
* The Qubbat al-Bahw (or Qubbat al-Bahu) at the Al-Zaytuna Mosque in Tunis (991)

### Decorative motifs
#### Floral and vegetal motifs

Arabesques, or stylized floral and vegetal motifs, derive from a long tradition of similar motifs in Syrian, Hellenistic, and Roman architectural ornamentation. Early arabesque motifs in Umayyad Cordoba, such as those seen at the Great Mosque or Madinat al-Zahra, continued to make use of acanthus leaves and grapevine motifs from this Hellenistic tradition. Almoravid and Almohad architecture made more use of a general striated leaf motif, often curling and splitting into unequal parts along an axis of symmetry. Palmettes and, to a lesser extent, seashell and pine cone images were also featured. In the late 16th century, Saadian architecture sometimes made use of a mandorla-type (or almond-shaped) motif which may have been of Ottoman influence.$^{:128}$
* Floral and vegetal motifs from the Caliphate period at Madinat al-Zahra in Spain, carved in panels of limestone (10th century)
* Arabesque motifs and a palmette image carved into stone in the spandrel of the Marinid gate at Chellah, Rabat (14th century)
* Arabesques carved in stucco over an archway in the al-Attarine Madrasa in Fes (14th century)
* Arabesques in stucco in the Court of the Myrtles at the Alhambra (14th century)
* Arabesque and pine cone motifs along with Kufic inscriptions around the Ben Youssef Madrasa's mihrab, in Marrakesh (16th century)

#### Sebka motif

Various types of interlacing lozenge-like motifs are heavily featured on the surface of minarets starting in the Almohad period (12th–13th centuries) and are later found in other decoration such as carved stucco along walls in Marinid and Nasrid architecture, eventually becoming a standard feature in the western Islamic ornamental repertoire in combination with arabesques. This motif, typically called sebka (meaning "net"),$^{:80}$ is believed by some scholars to have originated with the large interlacing arches in the 10th-century extension of the Great Mosque of Cordoba by Caliph al-Hakam II.$^{:257–258}$ It was then miniaturized and widened into a repeating net-like pattern that can cover surfaces. This motif, in turn, had many detailed variations. One common version, called darj wa ktaf ("step and shoulder") by Moroccan craftsmen, makes use of alternating straight and curved lines which cross each other on their symmetrical axes, forming a motif that looks roughly like a fleur-de-lys or palmette shape.$^{:232}$$^{:32}$ Another version, also commonly found on minarets in alternation with the darj wa ktaf, consists of interlacing multifoil/polylobed arches which form a repeating partial trefoil shape.$^{:32,34}$
* A sebka or darj wa ktaf motif on one of the facades of the Hassan Tower in Rabat, Morocco (late 12th century)
* Variation of the sebka motif with a trefoil-like shape on the minaret of the Kasbah Mosque in Marrakesh, Morocco (late 12th century)
* Sebka pattern filled with other motifs in carved stucco decoration at the Alhambra in Granada, Spain (14th century)
* Darj wa ktaf motif on Bab Mansour in Meknes, Morocco (early 18th century)

#### Geometric patterns

Geometric patterns, most typically making use of intersecting straight lines which are rotated to form a radiating star-like pattern, were common in Islamic architecture generally and across Moorish architecture. These are found in carved stucco and wood decoration, and most notably in zellij mosaic tilework which became commonplace in Moorish architecture from the 13th century onward. Other polygon motifs are also found, often in combination with arabesques.
In addition to zellij tiles, geometric motifs were also predominant in the decoration and composition of wooden ceilings. One of the most famous examples of such ceilings, considered the masterpiece of its kind, is the ceiling of the Salón de Embajadores in the Comares Palace at the Alhambra in Granada, Spain. The ceiling, composed of 8,017 individual wooden pieces joined into a pyramid-like dome, consists of a recurring 16-pointed star motif which is believed to have symbolized the Seven Heavens of Paradise described in the Qur'an (specifically the Surat al-Mulk, which is also inscribed at the ceiling's base).$^{:159}$ Like other stucco and wood decoration, it would have originally been painted in different colours order to enhance its motifs.$^{:44}$
* Eight-pointed and sixteen-pointed star motifs in zellij (azelujos) tilework at the Sala del Mexuar in the Alhambra in Granada, Spain (14th century)
* Geometric patterns in stucco decoration at the Hall of the Two Sisters in the Alhambra (14th century)
* Geometric patterns in zellij tilework at the Al-Attarine Madrasa in Fes (14th century)
* Twelve-pointed star motifs in zellij tilework at the Saadian Tombs in Marrakesh, Morocco (16th century)
* Geometric motifs on the bronze plating of the doors of the Al-Attarine Madrasa (14th century)
* The enormous wooden ceiling of the Salón de Embajadores (the Nasrid throne room) at the Alhambra in Granada, Spain (14th century)
* Another example of geometric patterns in a (smaller and simpler) wooden ceiling in the Ben Youssef Madrasa in Marrakesh (16th century)
* Painted geometric motifs on a wooden ceiling in the Bahia Palace in Marrakesh (late 19th century)

#### Arabic calligraphy

Many Islamic monuments feature inscriptions of one kind or another which serve to either decorate or inform, or both. Arabic calligraphy, as in other parts of the Muslim world, was also an art form. Many buildings had foundation inscriptions which record the date of their construction and the patron who sponsored it. Inscriptions could also feature Qur'anic verses, exhortations of God, and other religiously significant passages. Early inscriptions were generally written in the Kufic script, a style where letters were written with straight lines and had fewer flourishes.$^{:38}$ At a slightly later period, mainly in the 11th century, Kufic letters were enhanced with ornamentation, particularly to fill the empty spaces that were usually present above the letters. This resulted in the addition of floral forms or arabesque backgrounds to calligraphic compositions.$^{:251}$
In the 12th century the cursive Naskh script began to appear, though it only became commonplace in monuments from the Marinid and Nasrid period (13th–15th century) onward.$^{:250,351–352}$$^{:38}$ Kufic was still employed, especially for more formal or solemn inscriptions such as religious content.$^{:38}$$^{:250,351–352}$ However, from the 13th century onward Kufic became increasingly stylized and almost illegible. In the decoration of the Alhambra, one can find examples of "Knotted" Kufic, a particularly elaborate style where the letters tie together in intricate knots. This style is also found in other parts of the Islamic world and may have had its origins in Iran. The extensions of the letters could turn into strips or lines that continued to form more motifs or form the edges of a cartouche encompassing the rest of the inscription.$^{:269}$ As a result, Kufic script could be used in a more strictly decorative form, as the starting point for an interlacing or knotted motif that could be woven into a larger arabesque background.$^{:351–352}$
* Kufic inscriptions carved into the façade of the Mosque of the Three Doors in Kairouan, Tunisia, dating from 866
* Kufic Arabic inscriptions in gold mosaics above the mihrab of the Great Mosque of Cordoba (10th century)
* Late 12th-century Kufic inscription carved into stone on the Almohad gate of Bab Agnaou in Marrakesh
* Kufic script with floral and interlacing flourishes, painted on tile, in the Al-Attarine Madrasa, Fes, Morocco (early 14th century)
* Cursive (Naskh) Arabic script carved into stucco in the al-Attarine Madrasa in Fes (early 14th century)
* Calligraphic inscription carved into wood in the Sahrij Madrasa in Fes, surrounded by other arabesque decoration (early 14th century)
* Calligraphy in the Salón de Embajadores in the Alhambra, Granada (14th century): above is the Nasrid motto ("There is no conqueror but God") in cursive script, repeated more than once, while below is a larger inscription in "Knotted" Kufic

### Muqarnas

Muqarnas (also called mocárabe in Spain), sometimes referred to as "honeycomb" or "stalactite" carvings, consists of a three-dimensional geometric prismatic motif which is among the most characteristic features of Islamic architecture. This technique originated further east in Iran before spreading across the Muslim world.$^{:237}$ It was first introduced into al-Andalus and the western Maghreb by the Almoravids, who made early use of it in early 12th century in the Qubba Ba'adiyyin in Marrakesh and in the Qarawiyyin Mosque in Fes.$^{:237}$ While the earliest forms of muqarnas in Islamic architecture were used as squinches or pendentives at the corners of domes,$^{:237}$ they were quickly adapted to other architectural uses. In the western Islamic world they were particularly dynamic and were used, among other examples, to enhance entire vaulted ceilings, fill in certain vertical transitions between different architectural elements, and even to highlight the presence of windows on otherwise flat surfaces.
* Small muqarnas cupola inside the mihrab of the Mosque of Tinmal (mid-12th century)
* Muqarnas above a window in the Bou Inania Madrasa of Meknes (14th century)
* Elaborate muqarnas dome in the Sala de las dos Hermanas in the Alhambra of Granada, Spain (14th century)
* Closer view of the details at the apex of a muqarnas dome in the Sala de los Reyes in the Alhambra
* Extreme close-up of carved and painted details in constituent niches of a muqarnas dome in the Sala de los Reyes in the Alhambra
* Rectangular muqarnas vault carved in cedar wood at the Bou Inania Madrasa in Fes, Morocco (mid-14th century)
* Muqarnas carved in wood in the Dar al-Makhzen of Tangier (17th century or later)

### Zellij (tilework)

Tilework, particularly in the form of mosaic tilework called zellij, is a standard decorative element along lower walls and for the paving of floors across the region. It consists of hand-cut pieces of faience in different colours fitted together to form elaborate geometric motifs, often based on radiating star patterns. Zellij made its appearance in the region during the 10th century and became widespread by the 14th century during the Marinid and Nasrid period. It may have been inspired or derived from Byzantine mosaics and then adapted by Muslim craftsmen for faience tiles.
In the traditional Moroccan craft of zellij-making, the tiles are first fabricated in glazed squares, typically 10 cm per side, then cut by hand into a variety of pre-established shapes (usually memorized by heart) necessary to form the overall pattern. This pre-established repertoire of shapes combined to generate a variety of complex patterns is also known as the hasba method. 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.

### Riads and gardens

A riad (sometimes spelled riyad; Arabic: رياض) is an interior garden found in many Moorish palaces and mansions. It is typically rectangular and divided into four parts along its central axes, with a fountain at its middle. Riad gardens probably originated in Persian architecture (where it is also known as chahar bagh) and became a prominent feature in Moorish palaces in Spain (such Madinat al-Zahra, the Aljaferia, and the Alhambra). 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. The term is nowadays applied in a broader way to traditional Moroccan houses that have been converted into hotels and tourist guesthouses.
Many royal palaces were also accompanied by vast pleasure gardens, sometimes built outside the main defensive walls or within their own defensive enclosure. This tradition is evident in the gardens of the Madinat al-Zahra built by the Caliphs of Cordoba (10th century), in the Agdal Gardens south of the Kasbah of Marrakesh created by the Almohads (12th century), the Mosara Garden created by the Marinids north of their palace-city of Fes el-Jdid (13th century), and the Generalife created by the Nasrids east of the Alhambra (13th century).

## Building types
### Mosques

Historically, there was a distinction between regular mosques and Friday mosques, which were larger and had a more important status by virtue of being the venue where the khutba (sermon) was delivered on Fridays. In the early Islamic era 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. Mosques could also frequently be accompanied by other facilities which served the community.
Most mosques in the region have roughly rectangular floor plans and follow the hypostyle format: they consist of a large prayer hall divided into naves or aisles by rows of horseshoe arches that run either parallel or perpendicular to the qibla wall (the wall towards which prayers faced). The qibla (direction of prayer) is symbolized by a decorative niche or alcove in the qibla wall, known as a mihrab. Next to the mihrab there is usually a symbolic pulpit known as a minbar, usually in the form of a staircase leading to a small kiosk or platform, where the imam would stand to deliver the khutba. The mosque also normally includes a sahn (courtyard) which often has a fountain or water basin to assist with ablutions. In early periods this courtyard could be relatively minor in proportion to the rest of the mosque, but in later periods (in Morocco at least) it became progressively larger until it was equal in size to the prayer hall and sometimes larger.
Hypostyle mosques also frequently follow the "T-type" model, in which the nave between the arches running towards the mihrab (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 it), thus forming a T-shaped space in the floor plan of the mosque. This part of the plan was often accentuated by greater decoration, such as more elaborate arch shapes or decorative cupola ceilings at each end of the "T").
From afar, mosque buildings are distinguished by their minaret towers. 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 a finial of copper or brass spheres. Some minarets in North Africa have octagonal shafts, though this is more characteristic of certain regions or periods. Inside the main shaft a staircase, and in other cases a ramp, ascends to the top.
The floor plan of a mosque is also aligned with the direction of prayer, sometimes even at odds with the orientation of the streets around it. Today it is standard practice that the direction of prayer is the line marking the shortest distance between oneself and the Kaaba in Mecca. In the western Mediterranean, this corresponds to a generally eastern orientation (varying slightly depending on your exact position). However, in early Islamic periods there were other interpretations of what the qibla should be. In the western Islamic world in particular, early mosques often had a southern orientation, as can be seen in major monuments like the Great Mosque of Cordoba and the Qarawiyyin Mosque in Fes. This was based on a reported hadith of the Islamic prophet Muhammad which stated that "what is between the east and west is a qibla", as well as on a popular view that mosques should follow the cardinal alignment of the Kaaba itself, whose axes are aligned according to certain astronomical references (e.g. its minor axis is aligned with the sunrise of the summer solstice).

### Synagogues

Synagogues had a very different layout from mosques but in North Africa and Al-Andalus they often shared similar decorative trends as the traditional Islamic architecture around them, such as colourful tilework and carved stucco, though later synagogues in North Africa were built in other styles too. Notable examples of historic synagogues in Spain include the Synagogue of Santa Maria la Blanca in Toledo (rebuilt in its current form in 1250), the Synagogue of Cordoba (1315), and the Synagogue of El Tránsito in Toledo (1355–1357). In Morocco they include the Ibn Danan Synagogue in Fes, the Slat al-Azama Synagogue in Marrakesh, and the Beth-El Synagogue in Casablanca, though numerous other examples exist. One of the most famous historic synagogues in Tunisia is the 19th-century El Ghriba synagogue.

### Madrasas

The madrasa was an institution which originated in northeastern Iran by the early 11th century and was progressively adopted further west. It provided higher education and served to train Islamic scholars, particularly in Islamic law and jurisprudence (fiqh), most commonly in the Maliki branch of Sunni legal thought. The madrasa of the Sunni world was generally antithetical to more heterodox religious doctrines, including the doctrine espoused by the Almohads. As such, in the westernmost parts of the Islamic world it only came to flourish in the late 13th century, under the Marinid, Zayyanid, and Hafsid dynasties that succeeded the Almohads.
In other parts of the Muslim world, the founders of madrasas could name themselves or their family members as administrators of the foundation's waqf (a charitable and inalienable endowment), making them a convenient means of protecting family fortunes, but this was not allowed under the Maliki school of law that was dominant in the western Islamic lands. As a result, the construction of madrasas was less prolific in the Maghreb and al-Andalus than it was further east. Madrasas in this region are also frequently named after their location or some other distinctive physical feature, rather than after their founders (as was common further east).$^{:178}$
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.

### Mausoleums and zawiyas

Most Muslim 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 a qubba (also spelled koubba). This was especially characteristic for the tombs of "saints" such as walis and marabouts: 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 as Sufism. Some of these tombs became the focus of entire religious complexes built around them, known as a zawiya (also spelled zaouia; Arabic: زاوية). They typically included a mosque, school, and other charitable facilities. Such religious establishments were major centers of Sufism across the region and grew in power and influence over the centuries, often associated with specific Sufi Brotherhoods or schools of thought.

### Funduqs (merchant inns)

A funduq (also spelled foundouk or fondouk; Arabic: فندق) was a caravanserai or commercial building which served as both an inn for merchants and a warehouse for their goods and merchandise. In North Africa some funduqs also housed the workshops of local artisans. As a result of this function, they also became centers for other commercial activities such as auctions and markets. 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 the Funduq al-Najjarin in Fes, were quite richly decorated. While many structures of this kind can be found in historic North African cities, the only one in Al-Andalus to have been preserved is the Nasrid-era Corral del Carbón in Granada.

### Hammams (bathhouses)

Hammams (Arabic: حمّام) are public bathhouses which were ubiquitous in Muslim cities. Essentially derived from the Roman 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.$^{:215–216,315–316}$ Heat and steam were generated by a hypocaust 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. 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 with zellij, stucco, or carved wood.$^{:316}$ The cold, warm, and hot rooms were usually vaulted 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.$^{:316}$ Many historic hammams have been preserved in cities like Marrakesh and Fez in Morocco, partly thanks to their continued use by locals up to the present day. In Al-Andalus, by contrast, they fell out of use after the expulsion of Muslims from the Iberian Peninsula and are only preserved as archeological sites or historic monuments.

### Palaces

The main palaces of rulers were usually located inside a separate fortified district or citadel of the capital city. These citadels included a complex of different structures including administrative offices, official venues for ceremonies and receptions, functional amenities (such as warehouses, kitchens, and hammams), and the private residences of the ruler and his family. Although palace architecture varied from one period and region to the next, certain traits recurred such as the predominance of courtyards and internal gardens around which elements of the palace were typically centered.
In some cases, rulers were installed in the existing fortified citadel of the city, such as the many Alcazabas and Alcázars in Spain, or the Kasbahs of North Africa. The original Alcazar of Cordoba, used by the Umayyad emirs and their predecessors, was an early example of this. When Cordoba first became the capital of Al-Andalus in the 8th century the early Muslim governors simply moved into the former Visigothic palace, which was eventually redeveloped and modified by the Umayyad rulers after them. The Alcázar of Seville was also occupied and rebuilt in different periods by different rulers. In Marrakesh, Morocco, the Almohad Caliphs in the late 12th century built a large new palace district, the Kasbah, on the south side of the city, which was subsequently occupied and rebuilt by the later Saadian and 'Alawi dynasties. In Al-Andalus many palace enclosures were highly fortified alcazabas located on hilltops overlooking the rest of the city, such as the Alcazaba of Almería and the Alcazaba of Málaga, which were occupied by the various governors and local rulers. The most famous of all these, however, is the Alhambra of Granada, which was built up by the Nasrid dynasty during the 13th to 15th centuries.
Rulers with enough resources sometimes founded entirely separate and autonomous royal cities outside their capital cities, such as Madinat al-Zahra, built by Abd ar-Rahman III outside Cordoba, or Fes el-Jdid built by the Marinids outside old Fez. Some rulers even built entirely new capital cities centered on their palaces, such as the Qal'at Bani Hammad, founded in 1007 by the Hammadids in present-day Algeria, and Mahdia, begun in 916 by the Fatimid Caliphs in present-day Tunisia. In many periods and regions rulers also built outlying private estates with gardens in the countryside. As early as the 8th century, for example, Abd ar-Rahman I possessed such estates in the countryside outside Cordoba. The later Nasrid-built Generalife, located on the mountainside a short distance outside the Alhambra, is also an example of outlying residence and garden made for the private use of the rulers. Moroccan sultans also built pleasure pavilions or residences within the vast gardens and orchards that they maintained outside their cities, notably the Menara Gardens and Agdal Gardens on the outskirts of Marrakesh.

### Fortifications
#### In Al-Andalus

The remains of castles and fortifications from various periods of Al-Andalus have survived across Spain and Portugal, often situated on hilltops and elevated positions that command the surrounding countryside. A large number of Arabic terms were used to denote different types and functions, many of which were borrowed into Spanish and are found in present-day toponyms, such as Alcazaba (from Arabic: القَـصَـبَـة, romanized: al-qaṣabah), meaning a fortified enclosure or citadel where the governor or ruler was typically installed, and Alcázar (from Arabic: القصر, romanized: al-qaṣr), which was typically a palace protected by fortifications. Fortifications were built either in stone or in rammed earth. Stone was used more commonly in the Umayyad period (8th–10th centuries) while rammed earth became more common in subsequent periods and was also more common in the south.
In the Umayyad period (8th–10th centuries) an extensive network of border fortifications stretched in a wide line roughly from Lisbon in the west then up through the Central System of mountains in Spain, around the region of Madrid, and up to the region of Navarre and Huesca in the northeast.$^{:63}$ Castles and fortified garrisons existed in the interior of the realm as well. Many of these early fortifications had relatively simple designs with no barbicans and only a single line of walls. The gates were typically straight entrances with an inner and outer doorway on the same axis.$^{:100,116}$ Castles typically had quadrangular layouts with walls reinforced by rectangular towers.$^{:67}$ The authorities also built multitudes of small, usually round, watch towers which could rapidly send messages to each other via fire or smoke signals.$^{:66}$
Following the collapse of the Caliphate in the 11th century, the resulting political insecurity encouraged further fortification of cities.$^{:115}$ Military architecture also became steadily more complex. Fortified gates began to regularly include bent entrances.$^{:116}$ Military technology grew still more sophisticated during the Almohad period (12th and early 13th centuries), with barbicans appearing in front of city walls and albarrana towers appearing as a recurring innovation.$^{:166}$ Fortification towers also became taller and more massive, sometimes with round or polygonal bases but more commonly still rectangular. Some of the more famous tower fortifications from this period include the Calahorra Tower in Cordoba and the Torre del Oro in Seville. The latter is a dodecagonal tower which fortified a corner of the city walls and which, along with another tower across the river, protected the city's harbour.$^{:166}$
In the final period from the 13th to 15th centuries, fortresses and towns were again refortified. In addition to the fortifications of Granada and its Alhambra, the Nasrids built or rebuilt the Gibralfaro Castle of Málaga and the castle of Antequera, and many smaller strategic hilltop forts like that of Tabernas.$^{:212}$ This late period saw the construction of massive towers and keeps which likely reflected a growing influence of Christian military architecture.$^{:212}$$^{:322}$

#### In the Maghreb

Some of the oldest surviving Islamic-era monuments in the Maghreb are military structures in present-day Tunisia. The best-known examples are the Ribat of Sousse and the Ribat of Monastir, both dating generally from the Aghlabid period in the 9th century. A ribat was a type of residential fortress which was built to guard the early frontiers of Muslim territory in North Africa. They were built at intervals along the coastline so that they could signal each other from afar. Also dating from the same period are the city walls of Sousse and Sfax, both made in stone and bearing similarities to earlier Byzantine-Roman walls in Africa.$^{:29–36}$$^{:25–27}$
Several ruling dynasties in the region built fortified capitals or citadels. The Fatimids built a heavily fortified new capital at Mahdia in present-day Tunisia, located on a narrow peninsula extending from the coastline into the sea and surrounded by walls and a single land gate.$^{:89–91}$$^{:47}$ The Hammadids also built a new fortified capital in present-day Algeria known as Qal'at Bani Hammad in the 11th century, located on a strategic elevated site. Along with the earlier Zirid fortifications of Bijaya and 'Ashir, its walls were made mainly of rough stone or rubble stone, demonstrating a slow shift in construction methods away from earlier Byzantine-Roman methods and towards more characteristically North African and Berber architecture.$^{:92}$ The later Marinids fortified their palace-city of Fes el-Jdid, built in the late 13th century, with a line of double walls.
Starting with the Almoravid and Almohad domination of the 11th–13th centuries, most medieval fortifications in the western Maghreb shared many characteristics with those of Al-Andalus. City walls in Morocco were generally built out of rammed earth, reinforced at regular intervals by square towers, as exemplified by the walls of Marrakesh, the walls of Fes, and the walls of Rabat. In western Algeria, the walls of Tlemcen (formerly Tagrart) were likewise partly built by the Almoravids with a mix of rubble stone at the base and rammed earth above.$^{:220}$ As elsewhere, the gates were often the weakest points of a defensive wall and so were usually more heavily fortified than the surrounding wall. In Morocco, gates were often designed with a bent entrance.
In later centuries, Moroccan rulers continued to build traditional walls and fortifications while at the same time borrowing elements from European military architecture in the new gunpowder age, most likely through their encounters with the Portuguese and other European powers at this time. The Saadian bastions of Fes, such as Borj Nord, are one early example of these architectural innovations.
"Kasbah", or tighremt in Amazigh, can also refer to various fortresses or fortified mansions in the Atlas Mountains and the desert oases regions of Morocco. In these regions, often traditionally Amazigh (Berber) areas, kasbahs are again made of rammed earth and mud-brick (or sometimes stone), often marked by square corner towers and decorated with simple geometric motifs. Communal fortified granaries are another feature of local Berber architecture in southern Morocco, Algeria, and southern Tunisia, with styles and layouts differing from region to region.

## Preservation

Many important examples of Moorish architecture are located in Europe, in the Iberian Peninsula (in the former territories of Al-Andalus), with an especially strong concentration in southern Spain (modern-day Andalusia). There is also a high concentration of historic Islamic architecture in Morocco, Algeria, and Tunisia. The types of monuments that have been preserved vary greatly between regions and between periods. For example, the historic palaces of North Africa have rarely been preserved, whereas Spain retains multiple major examples of Islamic palace architecture that are among the best-studied in the world. By contrast, few major mosques from later periods have been preserved in Spain, whereas many historic mosques are still standing and still being used in North Africa.$^{:12–13}$$^{:xvii–xviii}$