Qantara Qantara

The Zirids and the Hammadids (972-1152)

Consult the historical map

After three centuries of Arabo-Islamic domination over the main regions of North Africa, the Berbers, converted for the most part to Islam since the 8th century, set up a central power in the eastern Maghreb. This task was taken on by the Sanhaja, a large tribal confederation, whose territory was modern central Algeria. This confederation was led by the  family of Ziri, the son of Manad, that rallied to the side of the Faitimid caliphate, based at Mahdia, with one main aim : to secure the region and drive back the advances of the Zanata tribal confederation, allied to the Sunnite Caliphate of Cordoba.

Achir: a Berbero-Fatimid fortress town

In order to carry out this mission, the second Fatimid caliph, Al-Qaim (r. 934-946) ordered Ziri to found a fortress town, Achir, in the mountains of Titri south of Icosium, the ancient Roman city of Algiers. The leader of the Sanhaja built the town in 935, constructing notably a palace and a large mosque. The town was subject to large urban expansion for two centuries, thanks to its position on the road from Kairouan to Fez, the two major urban centres of the Maghreb at that time. The palace’s architecture was strictly Fatimid in its inspiration.

The return of Berber domination

In 972, Al-Muizz Lideenillah (r. 953-975), the fourth Fatimid caliph, left the Maghreb and went to settle in Cairo, founded by his lieutenant Gawhar. He entrusted the government of the Maghreb to Buluggin (r. 972-984), who had succeeded his father, killed in combat, as leader of the Sanhaja. He gave him the name Abu al-Futuh Yusuf and the title Sayf al-Daula. The new master of the Maghreb left his tribal territory behind and settled into the Fatimid caliphal complex at Sabra Al-Mansouria, near Kairouan.

No sooner had the Zirid family taken hold of power than the tribes, who had long since been opposed to the emergence of any kind of state-power, organized resistance. The region of Oran and the furthest section of the Maghreb (i.e. Morocco) seceded from the territory governed by the Zirid family. Buluggin and his successors had to undertake pacification missions, but nevertheless failed to win over the rural communities of the western Maghreb, allied to the caliphate of Cordoba. Al-Mansour (r. 984-996) succeeded his father only to meet with the hostility of his cousins and brothers. In 997 he appointed his brother Hammad as governer of the province of Tahert in a bid to reassert the ruling family’s authority over a troubled region. After a few setbacks, he finally managed to rout the rebel rural communities. A few years later, the central Maghreb was the scene of a civil war, whose protagonists were Prince Al-Mansour’s cousins. Hammad was once again instructed to stamp out this intra-familial challenge; he managed to kill some of them, and drove the rest into exile in Al-Andalus, where they went on to found a Berber dynasty in Grenada in 1019.

In the absence of a clear mechanism for the transfer of power, the crisis within the Zirid dynasty deepened. The Fatimid caliphs in Cairo enjoined upon the Zirids a hereditary transfer of power from father-to-son, whereas the Sanhaja tribal tradition was gerontocratic. In 1005, Hammad forced his nephew, Prince Badis, into a power-sharing agreement : the former received the territories of the central Maghreb while the latter kept the towns of Ifriqiya. The Zirid dynasty then split into two branches : the Badisids in Ifriqiya, with their capital at Sabra Al-Mansouria and later at Mahdia, and the Hammadids, who founded the Qala of the Banu Hammad and later Béjaïa to house their court.

The founding of the Qala of the Banu Hammâd

At the foot of Mount Takarusat, upon the ruins of the ancient fortress of Qalat Al-Hijara, 35 km north-east of M’Sila, Hammad founded a princely town, the Qala, whose name was taken from the previous name of the place. Construction work began in 1007. Two years later the city was settled by Sanhaja elements and groups of people forcibly ejected from M’Sila, Hamza and the Aurès. The two dynasties got off to a warlike start. Each of them claimed possession of the border towns. (Constantine, Tigis, Qasr al-Ifriqi). After a series of clashes, a peace accord was signed in 1015, putting an end to the wars and confirming the dispositions of the agreement of 997. While the transfer of power did not cause any particular problems for the Badisids, the Hammadids encountered difficult situations: overthrows, assassinations and dissidence. In all, there was a run of nine sovereigns, the last of these being Yahya (1124-1152).

Development of architecture and the arts

Palatine-style mansions perch atop the Qala, at the foot of the mountain. Of the seven palaces referred to in written sources, all that can be seen today are the ruins of the Kawkab, Manar and Sabra palaces. The Fatimid architectural models and ornamental innovations of Sabra and Mahdia were much imitated by the Hammamids at the Qala. However, elements of Sassanid and Byzantine origin are also present in the palace ruins. For example, the use of muqarnas, notably to decorate the domes and doorways, is attested here for the first time in the Maghreb or in Al-Andalus. This element, Sassanid in origin, may well have been introduced via the Egyptian Fatimids.

The dome above the prayer hall (on the courtyard side) of the Great Mosque of Tunis (Al-Zaituna), where a profusion of niches blends with the bichrome stone, is a fine example of such art from the Badisid period. The craftsmen developed ceramic and enamel art. Thus a wide range of ceramics, representative of contemporary work from the mediaeval Muslim world, has been found at the Qala. An eastern influence is apparent, particularly due to the presence of lustre porcelain, pointing to Irak and Persia,. The population’s daily requirements of transport, storing liquid foodstuffs, lighting, utensils and decoration led to the extensive use of pottery and porcelain during this period. Badisid Kairouan, meanwhile, witnessed a flourishing of book arts, as attested to by the manuscripts preserved in the library of the town’s Great Mosque. Among these, parchment Korans , including the one copied and illuminated by Al-Warraq in 1020 for the nurse of Prince Al-Muizz b. Badis or the one donated to the library by this same monarch as a gesture of friendship towards the Malikite Ulemas of Kairouan, are striking examples. These luxury objects confirm the use of golden ink and indigo on parchment.

The Hammadids and the Badisids against the Hilali

Despite its achievements, the Maghreb under the Hammadids and the Badisids did not escape large-scale crises. The first was due to the politico-religious struggles between Shiites, linked to the Fatimids, and Sunnites, following the adoption of Sunnism by the Hammadids in 1015 and then by the Badisids in 1048. This crisis culminated in massacres inflicted upon the Shiites.

During this period a major event in Maghreb mediaeval history also occurred. The Hilali Arab tribes left Upper Egypt and attacked the territories of Ifriqiya and the central Maghreb. Al-Muizz b. Badis fled to Mahdia where his progeny had to face the Hilali and the Sicilian Normans up until 1148, when the latter took the town. As for the Hammadids, they founded Bougie (Béjaïa) on the coast of Little Kabylia in 1067, both in order to play a greater role in the prosperous Mediterranean economic area and to defend against Hilali attacks. In 1152, the troops of the Almohad Abd al-Mu’min put an end in one blow to the Hammadid and Zirid dynasties throughout the Muslim West.