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. 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. 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. 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. 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. Abu Zakariya's death was followed by a nearly a century of political weakness and conflicts, 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. 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). After 'Uthman's death the challenges to Hafsid rule increased on multiple fronts, from 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. 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. 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. 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. 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. 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. This minaret also influenced the design of later Tunisian minarets. Other foundations from the Hafsid period in Tunis include the Haliq Mosque (13th century) and the al-Hawa Mosque (1375), and the Bab al-Aqwas Mosque (15th century). The Hafsids also renovated the old Zaytuna Mosque of Tunis. 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. 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. 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 (or in 1249 according to some sources). 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. 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, 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). 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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 and built hammams (public baths) and hospitals. References