Great Mosque of Qal'at Bani Hammad

The Great Mosque of Al Qala'a(مسجد القلعة) is a major historical Mosque  located in the UNESCO World Heritage city of Qal'at Bani Hammad, in the province of M'sila, Algeria. Its construction dates back to the early 11th century, during the rule of the Hammadid Emir Hammad ibn Buluggin.

The Mosque spans an area of over 3500 square meters (38,000 sq ft), taking on a rectangular layout. It encompasses a vast courtyard, a hypostyle prayer hall, and a square minaret towering at 25 meters (82 ft) in height. Regarded as one of the largest historic mosques in Algeria, second only to the Mansourah, it also contains one of the country's oldest minarets. Additionally, the mosque likely exerted an influence on subsequent Almohad minarets, notably the Giralda in Seville. Together with other archaeological remnants of palatial structures, it stands as a primary testament to the opulence and impact of the Hammadid civilization.

History
The mosque was founded by the first Hammadid emir, Hammad ibn Buluggin, in the newly fortified city of Qal'at Bani Hammad, which would serve as the capital for the Hammadid Emirate. He hired skilled builders whom he brought from all corners of his domains. The Mosque is located in the lower part of the city, specifically in its southern section. According to Ibn Khaldun, it is assumed that the Great Mosque of El Qal'a was built in the year 398 AH, which corresponds to the year 1007 and coincides with the founding of the city, as is customary in the establishment of Islamic cities. Thus, the mosque was the first structure to be built, followed by the administrative center, and then the residential units.

The mosque was modified during the reign of Emir Al Nacir (1062–1088), who undertook a second phase of construction. It underwent transformations where the portico was expanded and extended to encircle the courtyard. The facade of the prayer hall was reinforced by closing some openings at the corners of the courtyard. Additional structures were added, and it was certainly during this phase that the maqsurah was built, with walls surpassing the roofs of the prayer hall. The entrances on either side of the minaret were closed off, and an additional floor was added to the corner constructions.

After the decline of the Qala'a of Beni Hammad due to the settlement of the Hilalian tribe in the region, the mosque fell into abandonment and then into ruins until the colonial period when General de Beylié led a three-and-a-half-month excavation campaign in 1908, partially uncovering the Palace of the Lake and the Mosque. Between 1964 and 1972, Dr.Rachid Bourouiba conducted research at the Qalaa of Beni Hammad, during which he unearthed the Great Mosque. In 1974, the restoration of the mosque's minaret took place; from 1976 to 1982, a UNESCO plan for the preservation and restoration of the site was implemented, and in 1987, an Algerian-Polish restoration mission was conducted on the Qal'a.

Architecture
The mosque of the Qalaa, like all cities in the Islamic world, occupies a central place in relation to the city (the densely populated lower part). On one hand, on the North side, there are the palaces (palace of the lake or of the emirs, of the stars, and of salvation), and on the other hand, on the South side, there are the houses and other activities, and in front passes the main road serving the city and leading from Bab Djennane in the West to Bab al Akwass in the east. Over time, most of the mosque has Disappeared, leaving behind only remnants such as the minaret, foundation of the walls, and some columns. The mosque, originally of rectangular shape, stood at 63 meters tall and 53 meters wide, encompassed by a fortified wall bolstered by rectangular pillars. Within the mosque, a prayer room measuring 53 meters in height and 34 meters in width boasts thirteen arches and eight pavements. The courtyard, spanning 53 meters in length and 26 meters in width, is separated from the prayer house by a walled enclosure featuring three accessible doors in the surrounding wall.

Enclosure
The structure is surrounded by a 1.50-meter-high wall fortified with rectangular pillars on the outside, each measuring 1.80 meters in length and 1.30 meters in width, it features three open doors: one to the east, one to the west, and the third to the north. The northern door leads to a staircase of nine steps, currently blocked. Positioned on the side, the entrance leads into a courtyard with a portico and a cistern. The portico's cylindrical columns, crafted from white marble, once rested on masonry bases but are now incomplete, with all five columns on the east side missing. These main doors served as connections to the exterior, granting entry to a series of rooms or chambers covering the plateau, likely serving a purpose similar to the Mosque of Sultan al-Kalaun in Cairo.

Courtyard
The courtyard, spanning 53.20 by 26.90 meters, is encircled by a portico and paved with white tiles, with a cistern at its center supplied by a spring. This cistern, measuring 11.15 meters in length, 5.40 meters in width, and 2.80 meters in height, features a partially collapsed vault. Eleven doors in the surrounding wall lead into the courtyard from the prayer hall. To the west of the courtyard, three rooms dedicated to ablutions were found, one containing a large jar. Adjacent to the eastern section, a small room potentially serving as a library was uncovered. The eastern room, paved with stones and divided by a semicircular arch, stands on two uprights. The minaret is positioned centrally along the north side of the courtyard. According to Blanchet, the wall dividing the courtyard from the main hall featured vertically pierced pottery pipes for rainwater drainage. Additionally, within this wall was a semi-cylindrical niche, one meter wide, functioning as a mihrab and adorned with green faience. Fragments of stained glass windows were also discovered within the wall. Lastly, archaeologists found thirty-three sections of roughly hewn stone shafts in the courtyard, ranging in diameter from 15 to 42 cm.

Minaret
At the heart of the mihrab axis, positioned in the center of the northern side of the courtyard, stands the minaret, currently reaching a height of 24.70 meters, albeit with its upper section collapsed. Its rectangular tower, measuring 6.50 meters on each side, houses a staircase with one hundred and twenty-seven steps, winding around its center and leading to the top. Constructed on a square plan reminiscent of those in Syria, it originally featured ceramic embellishments on its southern façade, while its wooden staircase was later replaced by one made of masonry.

The minaret's decoration is carefully organized into three vertical registers. At the forefront, a rectangular plaque adorned with palmettes and scrolls embellishes the entrance. In the middle, a series of blind or open arches, varying in shape from pointed to round, are superimposed. Flanking this central register are blind niches, occasionally embellished with shell motifs, housing mosaic ceramic or cross designs remodeled in stucco at the rear, arranged symmetrically. Early researchers discerned in certain elements of the decoration a connection with ancient and Byzantine motifs. The central register showcases, above the entrance door, a carved stone table, a partially preserved quintilobate arch, three stacked bays, and a recess with three semicircular arches. As for the lateral registers, they mirror each other's decoration, featuring, from bottom to top, a niche with a semi-cylindrical base crowned by a shell-shaped vault, and two niches with flat bases.

Destroyed at its summit, it is presumed that the minaret was originally crowned with battlements and a lantern resembling that of the Kutubiyya Mosque in Marrakech. The minaret's design and adornment are reminiscent of the Giralda in Seville and the Hassan Tower in Rabat. Only the south-facing façade overlooking the courtyard is embellished. What sets it apart is its unique arrangement of ornamentation into three vertical registers, a pioneering feature in the history of Islamic art, later echoed in the minaret of the Giralda in Seville.

Interior
The Mosque's prayer hall is rectangular, measuring 53.20 meters in length and 34.20 meters in width, with thirteen arches and eight pavements. However, the columns within this hall have vanished, leaving only the foundations intact. It is evident that the ceiling and roof were constructed from wood, as no masonry debris is found on the ground. Within the prayer hall, there is a structure surrounding the mihrab, consisting of five arches and four pavements. This structure, initially thought to be a maqsurah, is now understood to be a small mosque built inside the prayer hall after the Banu Hammad's departure to Béjaïa and the subsequent decline in the population of Qal'at Bani Hammad. The prayer hall itself comprises naves perpendicular to the qibla wall. The five central naves are separated from the rest of the hall by a 1.10-meter-thick wall, currently standing at a height of 0.60 meters. All that remains of the mihrab within the prayer hall is its base, truncated on the right side. Its south-facing niche was in the shape of a pointed arch, supported by two freestanding columns. However, only their locations are now discernible.

Decoration
Archaeologists investigating the origin of its ornamentation discovered that the columns were embellished with delicate Arabic calligraphy, along with fragments and panels featuring Kufic script and remnants of glazed pottery. The central register of the minaret includes a brick semi-circular arch supported by two columns flanking the entrance. Above this, there is a stone panel adorned with floral and geometric patterns such as Palmette,  followed by a pentagonal arch, a semi-circular arch, and then a curved straight arch with a window at the top. Additional windows adorn the structure, with three united semi-circular arches in the center. The side registers each features a semi-circular basin topped with a dome resembling a shell, similar to those seen on Al Manar tower. These are complemented by bluish-green pottery motifs embedded in the plaster, along with glazed bricks forming crosses in the arches below. These decorations are found exclusively on the southern facade of the minaret, with the other sides featuring only narrow windows.

The courtyard was paved with white tiles, while the marble columns, oval-shaped, stood atop reinforced pillars, with four securely anchored into the ground. However, the columns in pink or white marble, as noted by Paul Blanchet at the Great Mosque, have since disappeared. Additionally, the wall dividing the courtyard from the main prayer hall, as described by Blanchet, featured vertically positioned pottery pipes for rainwater drainage. Within this wall, a semi-cylindrical niche, measuring one meter wide and adorned with green faience, served as a mihrab. Notably, the wall also housed stained glass windows. The various excavation endeavors have unearthed a wealth of archaeological treasures, including decorative fragments, columns, basins, ceramics, coins, and jewelry. Presently, these artifacts are on display in museums across Algiers, Constantine, Sétif, and the in situ museum.

Influence
The Mosque, particularly its minaret, holds a significant position in Western Islamic architecture due to its original and innovative architectural features. Unlike the mosques of Kairouan and Sfax, the minaret of Qal'at Bani Hammad stands opposite the mihrab but differs significantly from them in form, with vertical walls instead of battered ones. Some researchers propose that this minaret influenced Almohad minarets, notably the Giralda of Seville, characterized by organized decorations across three vertical panels, reminiscent of motifs found in the Hammadid tower of al Qal'a. This influence extended to other Almohad towers, such as those of the Kutubiyya and the Hassan Mosque in Rabat. Furthermore, the minaret of Al Qal'a influence is also evident in Zayyanid and Merinid mosques in Tlemcen, where the internal structure of Zayyanid minarets bears a striking resemblance to that of the Qal'at Banu Hammad Mosque. Regarding the one of Mansourah Mosque, constructed by the Merinids in Tlemcen, its facade decorations seem to have been influenced by those of the Qal'at Banu Hammad and the Giralda in Seville.