# Hafsid architecture

Hafsid architecture developed under the patronage of the Hafsid dynasty in Ifriqiya (roughly present-day Tunisia) during the 13th to 16th centuries. Evolving from earlier Almohad and Ifriqiyan traditions, it was later influenced further by Mamluk architecture of Egypt and Syria and it increasingly deviated from the style of Moorish architecture in al-Andalus and the western Maghreb. After Hafsid rule ended, the trends of this architectural style continued to develop and characterize Tunisian architecture during the following Ottoman period.$^{:213}$

## Historical background

Prior to the Hafsid period, the architecture of the Almohads – along with that of the Almoravids who preceded them in the western Maghreb – is considered one of the most formative stages of "Moorish" or western Islamic architecture, establishing many of the forms and motifs that defined architectural styles in the region during the subsequent centuries.$^{:276}$ Ifriqiya was far from the main Almohad capital at Marrakesh (in present-day Morocco) and the Almohads themselves did not leave significant monuments here. However, they made Tunis the regional capital of their territories in Ifriqiya and established the city's kasbah (citadel) as their center of government. Ifriqiya also had its own longstanding tradition of western Islamic architecture that developed under the earlier Aghlabids (9th century), Fatimids (10th century), and Zirids (10th to 12th centuries), which influenced Hafsid architecture in turn.
The Hafsids were a branch of the Almohad ruling class that declared its independence from the Almohads in 1229 as Almohad fortunes were declining in the west. They developed their own state which came to control much of Ifriqiya and some of the surrounding region. They were also significant builders, particularly under the reigns of successful leaders, though not many of their monuments have survived intact to the present-day. While Kairouan remained an important religious center, Tunis was retained as the capital and progressively grew into the main city of the region and the main center of culture and architectural patronage.$^{:208}$ The reign of Abu Zakariya (r. 1229–1249), the first Hafsid ruler, was a period of growth and significant building activity. During the 13th century the economy expanded, thanks in part to growing trade with present-day France and Italy.$^{:208}$ Andalusi immigrants and refugees, fleeing the advance of the Reconquista in al-Andalus (on the Iberian Peninsula), also immigrated to Ifriqiya in large numbers during the Hafsid period, bringing their own influences to the region's art and culture.$^{:208}$ Abu Zakariya's death was followed by nearly a century of political weakness and conflicts,$^{:208}$ though his son al-Mustansir (r. 1249–1277) is known for building many rich palaces. In the mid 14th century, the Marinids of Morocco even managed to briefly capture Ifriqiya for several years.$^{:208}$
The wealth and power of the Hafsid state was only revived in the later 14th century under the reigns of Abu'l Abbas (r. 1370–1394) and Abu Faris (r. 1394–1434). Abu Faris, in particular, sponsored or encouraged the construction of new religious monuments, palaces, and fortresses, in addition to repairing old monuments and infrastructure. His grandson, Abu 'Amr 'Uthman (r. 1435–1488) improved and expanded water supply systems and sponsored the construction of zawiyas (Sufi religious complexes).$^{:208}$ After 'Uthman's death, the challenges to Hafsid rule increased on multiple fronts, including Arab tribesmen, Spanish attempts at expansion in North Africa, and a growing Ottoman presence to the east and west. Hafsid rule was brought to a final end in 1574, when Ifriqiya became a province of the Ottoman Empire.$^{:208}$

## General characteristics

Unlike Moorish architecture further west in the Maghreb and al-Andalus, Hafsid architecture was built primarily in stone (rather than brick or mudbrick) and it made use of stone vaulting, not common in the more western traditions, and it employed semi-circular arches rather than the typical horseshoe arches of the west. The greater use of stone and lesser use of wood likely reflected the long and continuous tradition of stoneworking in the region since Antiquity, the survival of many Roman remains, and possibly the shorter supply of timber.$^{:208}$ The surviving Hafsid monuments also appear to feature less decoration than those in the west, although art historian Jonathan Bloom notes that this observation may be a result of Hafsid decoration simply not surviving up to modern times.$^{:208}$ The use of two-coloured (dark and white) marble or masonry is a distinguishing feature of Hafsid architecture that was likely influenced by cultural contacts with contemporary Egypt, which was under Ayyubid and then Mamluk rule. Another distinctive element is the use of stone capitals of a type that originates from acanthus-decorated capitals in Antiquity.
As a result of these and other differences, Hafsid architecture developed in directions that increasingly deviated from architectural trends further west.$^{:213}$ Art historian Abdelaziz Daoulatli identifies two main periods of important architectural activity under the Hafsids, corresponding with the two periods of Hafsid political and economic power. The first, in the 13th century, is characterized by the relatively greater influence of Almohad (Maghrebi) and Andalusi artistic styles from the west. The second, in the 15th century, is characterized by the greater influence of Mamluk architecture to the east.

## Major monuments and developments
### Mosques

The Kasbah Mosque of Tunis was one of the first works of this period, commissioned by Abu Zakariya (the first independent Hafsid ruler) near the beginning of his reign, in 1231. Its floor plan had noticeable differences from previous Almohad-period mosques: the prayer hall is longer than it is wide, it is covered by cross-vaults instead of a flat wooden ceiling, and there is no courtyard. Much of the mosque was significantly renovated after the Hafsid period.$^{:208–209}$ The well-decorated mihrab (niche symbolizing the qibla) is the focus of the interior's decoration, and the upper part of the mihrab today still dates from the Hafsid period. It includes an Arabic inscription, with Qur'anic verses and details of the mosque's foundation, which is embellished with rich arabesque decoration of Almohad and Andalusi style. The space in front of the mihrab is covered by an intricate muqarnas dome, unlike any other in Ifriqiya, whose style is again reminiscent of architecture further west. The minaret, also completed in 1233, is distinctly Almohad in style, bearing strong resemblance to the minaret of the earlier Kasbah Mosque in Marrakesh. Like the latter, its façades are decorated with a sebka motif, but it differs here by being worked in stone rather than brick. This design is a significant shift in style from earlier Ifriqiyan minarets.$^{:208–209}$ This minaret also influenced the design of later Tunisian minarets.
Other foundations from the Hafsid period in Tunis include the al-Hawa Mosque (13th century), the Haliq Mosque (1375), and the Bab al-Aqwas Mosque (15th century). The Hafsids also renovated the old Zaytuna Mosque of Tunis.$^{:209}$ Among other works, the mosque's first attested minaret was built under Hafsid patronage in 1438–1439. Its appearance is known from old photographs: it had a cuboid shape like other contemporary minarets in the region and was crowned with an arcaded gallery and a polygonal turret or lantern at its summit.$^{:225}$ Between October 1448 and August 1450 an ablutions hall, the Mīḍāt al-Sulṭān, was built across the street in front of the mosque, attributed to the patronage of Abu 'Amr 'Uthman. The hall is notable for its black and white marble decoration. The two-coloured marble revetment is arranged in a striped pattern around the hall's blind arches and in star-shaped geometric and curvilinear motifs elsewhere.
The Hafsids also made significant renovations to the older Great Mosque of Kairouan, renovating its ceiling, reinforcing its walls, and building or rebuilding two of its entrance gates in 1293. The two gates are Bab al-Ma' ("Gate of Water") on the west side and Bab Lalla Rihana ("Gate of Lady Rihana", named after a pious woman buried nearby) on the east side.$^{:209}$ Bab Lalla Rihana, the most interesting gate, is a projecting portal that may have been inspired by the projecting entrance of the 10th-century Great Mosque of Mahdiya. Its ribbed dome is similar to other older domes in the mosque, while the horseshoe arches, merlons, blind arcade and plaster-carved arabesque decoration are similar to western Maghrebi or Andalusi styles.

### Madrasas

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 building was heavily renovated in the 17th century and its original decoration has not been preserved. It was built on an irregular rectangular plot near the Zaytuna Mosque. From the street, a staircase climbs to the entrance where a bent passage leads to a central square courtyard. Across the courtyard, opposite the entrance, is a small vaulted prayer hall. In the middle of the other two sides of the courtyard are vaulted rooms, entered through large arches, which were probably classrooms. A second floor exists, with a gallery around the courtyard leading to 19 small rooms that housed students. A second, larger prayer hall is also found on the upper floor, directly above the ground floor prayer hall.$^{:211}$ The layout, in which the entrance and major rooms of the ground floor are aligned symmetrically with the two central axes of the building, may have been inspired by the layout of madrasas in Egypt or further east. It also resembles the layout of traditional houses in the medina of Tunis,$^{:211}$ and the building may have been a former house that was remodeled and repurposed into a madrasa.
This foundation of the Madrasa al-Shamma῾iyya was followed by many others (almost all of them in Tunis), including the Madrasa al-Hawa (founded in the 1250s), the Madrasa al-Ma'ridiya (1282), and the Madrasa al-Unqiya (1341).$^{:211}$ Many of these early madrasas, however, have been poorly preserved or have been considerably modified in the centuries since their foundation.$^{:209–211}$ The Madrasa al-Muntasiriya, completed in 1437, is among the best preserved madrasas of the Hafsid period.$^{:211}$ Similar in layout in the al-Shamma῾iyya, it has a central rectangular courtyard with a recessed space opening in the middle of each side of the courtyard. One recess leads to the entrance, the one opposite it leads to a nine-bay (nine-domed) prayer hall, and another to a classroom, with the last one now destroyed. No upper floor, if there was one, has been preserved.$^{:211}$ This layout seems to be inspired by the classic four-iwan layout found in madrasas of the Middle East, possibly due to Mamluk influence.

### Palaces

Almost nothing of the Hafsid royal palaces have survived to the present day, although some written descriptions are provided by historical writers like Ibn Khaldun. These sources describe a variety of palaces and gardens, many of them built on the outskirts or suburbs of Tunis. One such structure was the Qubbat Asarak, a large pavilion structure with a wide staircase at its entrance, built by al-Mustansir in 1253.$^{:211–212}$ Another palace built by the same ruler, the Abu Fihr Palace, was described as an enclosed garden containing a large water basin flanked by two pavilions with marble columns and wooden roofs. Water features were characteristic of earlier Ifriqiyan palaces, while the two pavilions appear to be a feature shared with Andalusi and western Maghrebi architecture of the same era, possibly of Almohad origin.$^{:212}$ Yet another palace built by al-Mustansir, the Ras al-Tabiya Palace, was described by a later Flemish writer as having four buildings arranged in a cross formation around a courtyard paved with colourful tiles. A fountain in the center of the courtyard fed four pools around it. This configuration was similar to a riad garden and recalls the layout of the later Badi Palace in Marrakesh.$^{:312}$ A vaulted underground passage allowed the women of the harem to travel privately to a park. 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}$ All of these examples were built on the outskirts of Tunis.
The last surviving Hafsid structure to have been built is the 'Abdeliya Palace in present-day La Marsa (on the coast near Tunis), which is the only Hafsid palace to survive in any form. It was originally built in 1500, but may even contain some older Almohad foundations. It was significantly restored in later periods and thus preserves none of its original decoration, except for the capitals of its columns. It may have served as a kind of seaside retreat for the Hafsid rulers, probably standing amidst gardens.$^{:212–213}$ It was one of three buildings that stood here, but the other two buildings have not been preserved. The building is entered through a triple-arched portico and contains a large rectangular courtyard with two porticos facing each other on either side. The courtyard is surrounded by domed or vaulted chambers. One of the courtyard porticos leads to a large T-shaped reception room (maq'ad), including a domed area at the back which projects outward from the rest of the building. The presence of many windows, which was unusual in the normally introverted domestic architecture of this era, most likely allowed for better enjoyment of the garden setting.$^{:212–213}$

### Mausoleums and zawiyas

Zawiyas, Sufi religious complexes usually associated with a tomb, began to appear in Ifriqiya during the 14th century, possibly adopting a tradition that already existed in the west. They provided teaching and accommodation for pilgrims to the founder's tomb, as well as other community services. One example is the Zawiya of Sidi 'Abid al-Gharyani in Kairouan, founded and begun in 1324 by Muhammad al-Jadidi, a prominent local Muslim jurist who later died in Mecca. His disciple, Abu Samir 'Abid al-Gharyani, continued teaching at the zawiya after him and was buried here in 1402. The addition of his tomb completed the original construction of the complex, but it has undergone multiple renovations since then. One of the later Hafsid sultans, Mulay Hasan, was buried next to al-Gharyani in the mausoleum chamber. Another example of this kind of complex is the Zawiya of Sidi Ben 'Arus in Tunis, founded in 1490.
The Mausoleum of Sidi Qasim al-Jalizi, in the suburbs west of Tunis, was built towards the end of the 15th century (circa 1496), founded by Sidi Qasim al-Jalizi (d. 1496), a zellij craftsman of Andalusi origin who was buried here at his death. While expanded in later centuries, the main mausoleum chamber still dates to the Hafsid period and displays a fusion of styles that is characteristic of the period. Rather than covered by a traditional vault or spherical dome, the chamber is covered by a pyramidal wooden roof with green tiles on the outside, typical of contemporary buildings further west in Morocco and al-Andalus. The hall's interior is decorated with several elements also characteristic of architecture further west, including carved stucco on the upper walls, flowery capitals, and cuerda seca tiles on the mihrab niche and lower walls that appear to be a local interpretation of the Hispano-Moresque style.$^{:227–228}$ On the other hand, the hall also features marble decoration on walls, columns, and around the framing of arches, which appear to be influenced by Ayyubid and Mamluk architecture further east.

### Fortifications

The cities of Tunisia were frequently fortified against outside attacks. The Hafsids fortified Tunis and Kairouan and repaired the walls of Sousse and Sfax. Many of the city walls that survived up to modern times were later built or rebuilt during the Ottoman period.$^{:481–482}$ Many have since been largely dismantled, including those of Tunis. Only one of the seven former city gates in Tunis, Bab Jedid ("New Gate"), has been preserved today. It was originally opened in 1276 to link the old city with a southern suburb that had been growing as a result of the development of the nearby Kasbah of Tunis. The gate's arched opening remains today but it would have originally been flanked by a defensive tower on either side. Inside, the gate has a bent passage which turns multiple times in order to slow any attackers. A part of the passage is open to the sky, allowing defenders to throw projectiles onto any attackers from above, while the rest of the passage is covered by groin vaults.

### Markets and other civic works

The Hafsids renovated and expanded the covered market (bazaar) in the old city of Tunis during the 13th and 14th centuries. One of these covered market streets is the Suq al-'Attarin ("Market of the Perfumers"), which adjoins the Zaytuna Mosque in the heart of the city and consists of three streets covered by brick barrel vaults. The Hafsids also improved waterworks$^{:208}$ and built hammams (public baths) and hospitals.