Zirid Dynasty

الزيريون

Began 972Ended 1148The Islamic West

The Sanhaja governors the Fatimids left behind when they went to Cairo, who changed sides after eighty years and were answered with a migration.

Reach
No cited figure
Lasted
176 yrs
Population
No cited figure
Rating
45th pct

Facts

Core region
Ifriqiya
Capitals
  • Sabra al-Mansuriyyafrom 972 to 1057
  • Mahdiaالمهديةfrom 1057
Founder
Buluggin ibn Zirir. 972–984
Peak-era ruler
al-Mu'izz ibn Badisr. 1016–1062
Last ruler
al-Hasan ibn Ali
Administration
Arabic
Writing system
Arabic
How it ended
conquest1148Abun-Nasr, A History of the Maghrib in the Islamic Period (1987)

How it was governed

4 of 4 coded
Army raised byHow the fighting force was recruited, not how it fought.
tribal levy andslave soldier
  • tribal levy Contingents raised through kin or tribal structures the ruler did not create
  • slave soldier Purchased unfree troops attached to the ruler personally
Abun-Nasr, A History of the Maghrib in the Islamic Period (1987)
Revenue fromWhat the state lived on. The values are unranked: the field cannot express which mattered most.
land tax andtrade toll
  • land tax Tax on agricultural production and land
  • trade toll Customs, straits dues and caravan levies
Abun-Nasr, A History of the Maghrib in the Islamic Period (1987)
Succession byThe rule in force, not the outcome. A rule repeatedly violated is still the rule.
appanage
  • Patrimonial division among heirs
Abun-Nasr, A History of the Maghrib in the Islamic Period (1987)
Right to rule fromThe ground publicly asserted — on coins, in the khutba, in titles.
caliphal investiture
  • A grant or diploma from the caliph
Abun-Nasr, A History of the Maghrib in the Islamic Period (1987)

Each line is drawn from a source that addresses the question directly. A line reads No cited figure where no source consulted does — never because the answer seemed obvious.

Turning points

3 hinges
  1. 1015The Hammadid splitsuccession crisis

    A cadet branch at the Qal'a in the central Maghreb rebelled, put the Abbasid name in its own khutba, and founded a separate dynasty that lasted a century and a half. Ifriqiya and the central Maghreb became two polities, thirty-five years before either had to face the Banu Hilal.

    Abun-Nasr, A History of the Maghrib in the Islamic Period (1987)

  2. 1052Haydaranbattle

    A Zirid army was broken by a far smaller Banu Hilal force, and the migration the Fatimids had loosed could not be stopped afterwards. It is the point at which a state stopped being able to protect the agriculture it lived on.

    Abun-Nasr, A History of the Maghrib in the Islamic Period (1987)

  3. 1057Kairouan abandonedcapital move

    The capital of Ifriqiya since the conquest, and the city with the oldest minaret in Islam standing in it, was left to be sacked, and the dynasty moved to a fortified peninsula on the coast. What remained was a port state living on shipping — smaller, and for ninety years viable.

    Abun-Nasr, A History of the Maghrib in the Islamic Period (1987)

Chapters

8 in order

Left behind

Drafted from Abun-Nasr, A History of the Maghrib in the Islamic Period (1987)formation

When the Fatimids took Egypt in 969 and moved their caliphate to a new city called Cairo, they left behind the province they had spent sixty years building it out of.

They left it to the Zirids. Buluggin ibn Ziri was the son of a Sanhaja Berber chief who had held the central Maghreb for the Fatimids against their enemies, and when al-Mu'izz went east in 972 he took up residence as viceroy of Ifriqiya with the whole western half of the caliphate under him.

The arrangement is the same one the Aghlabids had held from Baghdad a century and a half earlier: a distant caliph, a local family, a tribute, and a name in the Friday sermon. What is different here is that the caliph in question had personally been in Kairouan a few years before, and that the family holding the province had been the instrument of his own rise.

It worked for two generations and then divided. In 1015 a cadet branch under Hammad, holding the Qal'a in the mountains of the central Maghreb, refused subordination and set up on its own — and, being in rebellion against a Fatimid viceroy, put the Abbasid caliph's name in its own sermon. That is the Hammadid dynasty, which held the central Maghreb for a century and a half and built a mountain capital whose ruins are still there.

So by 1016, when al-Mu'izz ibn Badis came to the throne at Kairouan, the Fatimid west was already two polities, one of them Sunni in its public allegiance. Ifriqiya itself was overwhelmingly Sunni and Maliki — the Fatimids had never converted it, any more than they converted Egypt — and the province's scholars and townsmen had spent eighty years being governed in the name of a caliph they regarded as a heretic.

Al-Mu'izz ruled for forty-six years, and somewhere around the middle of them he did the popular thing.

Viceroys of the west

Drafted from Abun-Nasr, A History of the Maghrib in the Islamic Period (1987)expansion

For about eighty years the Zirids governed more of North Africa than anybody had since Rome, and did it as somebody else's deputies.

What al-Mu'izz handed over in 972 was the whole Fatimid west: Ifriqiya, the central Maghreb, and a claim on everything as far as the Atlantic. The caliph kept Egypt, Syria and the Hijaz, and the Zirid amir kept the province the caliphate had been built out of, on the understanding that he would hold it, pay for it and say the right name on Fridays.

What a viceroyalty of that size involves

Fighting Zanata, mostly, and doing it continuously.

The Sanhaja confederation the Zirids led and the Zanata confederation that held the central and western Maghreb had been enemies before either of them had a caliph to fight for, and the Fatimid–Umayyad rivalry gave them one each. Córdoba paid Zanata; Cairo paid Sanhaja; and the Maghreb spent the tenth century as a proxy war conducted by two Berber confederations with two caliphates' money.

Buluggin ibn Ziri campaigned west repeatedly and got as far as the Atlantic plain. His successors held rather less. Nobody could hold it all, because holding it all meant garrisoning a thousand miles of mountain and steppe against people who lived there, and nobody had that much money.

The other half

Which is why the family divided it.

By 1015 a cadet branch — the Hammadids — was ruling the central Maghreb from a new fortified capital in the mountains, independently in fact and eventually in name. Ifriqiya faces the sea, lives on its coastal plain and looks to Sicily and Egypt. The central Maghreb is mountain and steppe and lives on the routes crossing it. A single dynasty holding both was a Fatimid administrative convenience, and it survived the Fatimids' departure by forty-three years.

And the wealth

Ifriqiya in this period was still the richest province of the Maghreb and had been since Rome.

Olives and grain on the Tunisian plain; the ports at Mahdia, Sousse, Sfax and Tunis; the Sicilian trade; and the caravan routes to the Sahara. The Zirids minted, built, endowed and paid an army out of it, and Kairouan under them remained the intellectual centre of the western Islamic world — Maliki jurisprudence, and a Jewish community whose correspondence with Fustat survives in the Cairo Geniza and is some of the best evidence anywhere for how eleventh century Mediterranean commerce actually worked.

All of which rested on there being an agricultural interior to tax, and that is the thing that stopped.

The name in the sermon

Drafted from Abun-Nasr, A History of the Maghrib in the Islamic Period (1987)peak

In 1048 al-Mu'izz ibn Badis stopped saying the Fatimid caliph's name in the Friday sermon at Kairouan and said the Abbasid caliph's instead.

It is a small liturgical act and it was the most consequential decision anybody in Ifriqiya made in three hundred years.

What it meant

Everything, in a system where the sermon was the only regular public statement of who was sovereign.

The khutba named the ruler in whose name authority was exercised, in every congregational mosque, every week, to everybody. Changing the name was not a gesture: it was the formal transfer of allegiance from a Shi'i caliph in Cairo to a Sunni one in Baghdad, announced simultaneously in every town, and it could not be done quietly or taken back.

Why he did it

Because it was popular, and because he had been governing an overwhelmingly Sunni country in the name of a caliph its scholars regarded as a heretic for eighty years.

The Fatimids had never converted Ifriqiya. Their Isma'ilism had been the doctrine of a court and a movement, not of the province, and the Maliki establishment of Kairouan — the most prestigious body of scholars in the western Islamic world — had spent the better part of a century in a state of tolerated dissent. There were anti-Shi'i riots in the towns. The Zirid amir who put himself at the head of that feeling was doing what every ruler in his position eventually does, which is stop paying for other people's unpopularity.

The Abbasid caliph, who could do nothing for him and nothing to him, sent a diploma of investiture. It cost Baghdad nothing and it gave al-Mu'izz what he wanted, which was to be the legitimate Sunni ruler of a Sunni country.

The peak, and what it was standing on

This is the high point of the dynasty by every measure that would have been visible at the time. An independent, wealthy, orthodox state, holding the richest province in North Africa, ruling from the intellectual capital of the Islamic west, with its allegiance transferred to a caliph nobody objected to and its own scholars finally on its side.

It lasted four years.

The thing al-Mu'izz had not weighed is that the caliph he had abandoned could not send an army across Libya, and did not need one. What Cairo could do was send people — and the difference between an army and a migration is that an army can be defeated.

The answer was a migration

Drafted from Abun-Nasr, A History of the Maghrib in the Islamic Period (1987)contraction

Between 1041 and 1051 al-Mu'izz ibn Badis renounced the Fatimids and had the Abbasid caliph's name pronounced in the sermon at Kairouan. The city was delighted. It was the correct move for a Sunni ruler of a Sunni province with a Sunni scholarly establishment, and it was the last comfortable decision the dynasty made.

Cairo could not send an army across Libya. What it did instead was give permission.

The Banu Hilal and the Banu Sulaym were Arab bedouin confederations settled in Upper Egypt, where they were a nuisance. The Fatimid government encouraged them to go west into Ifriqiya, reportedly granting them the country and telling them to take it. They went — not as an army with a campaign but as a migration, with families and herds, over years, in numbers the sources put in the tens of thousands and modern estimates argue about.

In April 1052 a Zirid army was destroyed at Haydaran by a much smaller Hilali force. After that there was nothing to stop them, and what they did was not conquest in any ordinary sense of the word. They took no capital and founded no dynasty. They moved into the country, and the settled agriculture of Ifriqiya — the olive and grain economy that had made it the richest province of the Maghreb since Rome — could not survive being pastured over.

Kairouan was abandoned in 1057 and sacked. The city that had been the capital of the Islamic west since the conquest — with the oldest minaret in Islam standing in it — stopped being a capital and never became one again.

The long consequence is the one Ibn Khaldun wrote about three centuries later from Tunis. He treats the Hilali migration as the event that ruined the Maghreb's agriculture and made its politics tribal, and his account has been argued over ever since — modern historians are divided on how much of the region's decline it caused and how much it was blamed for. What is not disputed is the linguistic outcome. Before the Banu Hilal the Maghreb was a Berber-speaking country with Arabic in the cities. Afterwards Arabic spread into the countryside, and the language map of North Africa today is substantially the result.

A caliphate that could not punish a defection with an army punished it with a demographic event, and the map still shows it.

The goldsmith's son

Drafted from Khallikan, Biographical Dictionary (1842)contraction

The court poet of al-Mu'izz ibn Badis was the son of a Greek slave who worked as a goldsmith in a small town on the Tunisian coast, and he trained as a goldsmith himself before he found out what he could do with words.

Ibn Khallikan's entry on Ibn Rashiq of Kairouan is the closest thing the Zirid century has to a witness, and its most important sentence is a subordinate clause.

The career

He was born about the year 1000 — at Mahdia by one account, at Masila by another — and his father was a Greek mamluk, a white slave, attached as a client to an Arab tribe. The father was a goldsmith at Muhammadiya and taught his son the trade. The son studied letters there instead, began to compose, and conceived a strong desire to augment that talent and meet with literary men, which brought him to Kairouan.

At Kairouan he got into reputation, composed poems in honour of the ruling prince, and was attached to his service. The prince was al-Mu'izz ibn Badis, the Zirid amir who took the province out of Fatimid allegiance.

Ibn Rashiq wrote the Umda, a treatise on the art of poetry and on poetical criticism, and it became the standard work on the subject in Arabic; a century and a half later Ibn Khallikan cites it in entry after entry as the authority that settles a question about a verse. He wrote a specimen anthology, a collection of epistles, a philological treatise on words used in rare senses, and a small book called Grains of Gold — the goldsmith's son's title for something short and highly instructive.

The verses Ibn Khallikan chooses to preserve are not court panegyric. They are domestic and slightly sour:

I love my brother, though I turn away from him, and though my words rarely strike his ear. At the sight of his face I frown with pleasure, as you frown at the aspect of generous wine. Frowns do not always proceed from hatred, and secret hatred is often concealed by smiles.

And, on being old:

When I wish to be light and gay as in the days of my youth, five and forty years refuse their consent. My steps falter, not with age, but with the years which I drag after me.

The clause

Then the line that puts the whole Zirid century into one sentence of a reference book:

He continued in that city till it was carried and destroyed by the Arabs, and its inhabitants massacred; on which he passed over to Sicily and settled at Mazara, where he died.

That is Kairouan in 1057, from a man who was in it. The Banu Hilal took the intellectual capital of the western Islamic world, and the court poet of the prince whose change of allegiance had brought them west got out and crossed to the other side of the strait.

He died at Mazara del Vallo — Ibn Khallikan settles on 1070 and notes that a learned hand he consulted put it six years earlier — in a Muslim Sicily that had been conquered from Kairouan two hundred and thirty years before, and that the Normans began taking while he was living on it.

What is worth noticing about the shape

Nothing in this life was planned by anybody, and all of it depended on the state.

A Greek taken as a slave into Ifriqiya makes a living as a goldsmith and puts his son into the trade. The son goes to the capital because that is where the patrons are, and the patrons exist because the Zirids were rich enough to keep a court. The court is destroyed by a migration the prince's own politics invited. The poet leaves for the nearest place where Arabic is still the language of a government, and that place is an island the province had conquered when it was strong.

And the book survived all of it. The Umda went out of Kairouan before the Arabs arrived, and was still being quoted as the authority on Arabic verse two hundred years later by a judge in Cairo who knew the city it was written in only as a place that had been destroyed.

One of the poems Ibn Khallikan keeps is a complaint to God about being harassed by small enemies, and it reads differently once the date is known:

O Lord! I am not able to repel this evil, and to thee do I apply for succour against this feeble worker of evil. Why hast thou sent against me a thousand gnats, whilst thou didst send only one against Nimrod?

The other half, in the mountains

Drafted from Abun-Nasr, A History of the Maghrib in the Islamic Period (1987)aside

The family split in 1015, when a cadet branch under Hammad refused subordination and put the Abbasid caliph's name in its own sermon. That branch held the central Maghreb for a century and a half, and what it built is the reason to dwell on it.

Qal'at Bani Hammad was founded in 1008 in the Hodna mountains of what is now northern Algeria — a fortified capital on a slope at about a thousand metres, chosen for defensibility rather than for trade or agriculture, in country where neither is abundant. It was the Hammadid seat for about eighty years before they moved down to Bougie on the coast, and then it was abandoned; Almohad forces destroyed what was left of it in the 1150s.

Because it was abandoned rather than built over, it survives. The site holds the remains of the palaces, the cisterns and water channels, the walls, and a congregational mosque with a square minaret twenty-five metres high — one of the oldest standing in Algeria, and in the same tradition as the Kairouan minaret it was built two centuries after. It is a UNESCO site, and the reason it matters archaeologically is precisely that nobody kept living in it: a fortified Muslim city of the eleventh century preserved at the moment it stopped, rather than edited by eight centuries of continuous occupation.

The split is usually filed as a succession quarrel, and it is better understood as the ordinary geography of the Maghreb asserting itself. Ifriqiya faces the sea and lives on its coast and its plain; the central Maghreb is mountains and steppe and lives on the routes crossing it. A single dynasty holding both was a Fatimid administrative convenience, and it lasted forty-three years.

And the two halves ended the same way and for the same reason. Both were driven out of their inland capitals by the Banu Hilal migration — the Zirids from Kairouan in 1057, the Hammadids from the Qal'a in the 1090s — and both moved to fortified ports, Mahdia and Bougie, and lived on shipping for their last century. The migration did not conquer anybody. It moved two dynasties to the coast and left the interior to the tribes, which is the map the Almohads and then the Hafsids inherited.

A port instead of a province

Drafted from Abun-Nasr, A History of the Maghrib in the Islamic Period (1987)end

What the Zirids had after 1057 was Mahdia — the fortified peninsula on the Tunisian coast that the Fatimids had built as their own first capital, designed to be defensible from the land side by people who expected trouble from exactly that direction.

They lived there for ninety years, and the state they ran from it was a different kind of thing. There was no province left to tax, so they taxed the sea: shipping, customs, the grain trade with Sicily, and a fleet that raided and escorted. Zirid squadrons operated across the central Mediterranean, and for a time the dynasty was involved in Sicily — where the Muslim emirate the Aghlabids had founded was breaking into factions, and where one faction invited in the Normans.

That invitation was the end of them. Norman Sicily under Roger II wanted the African grain coast, and it took it in pieces: Jerba, then Tripoli, then through the 1140s the Tunisian ports one after another. In 1148 the Normans took Sfax, Gabès and Mahdia itself. Al-Hasan, the last Zirid, got out, spent years as a guest of various Maghribi powers, and died in 1167 under Almohad protection.

What actually destroyed them

No dynasty took Ifriqiya from the Zirids. That is the thing worth holding onto, because it is very unusual.

A migration ruined the tax base. The state retreated to a port and lived on the sea for ninety years. Then a Norman fleet took the port — and the Sicily those Normans ruled was the one the Aghlabids had conquered from Kairouan three centuries earlier, with an administration still working in Arabic.

There is no single agent to name for an ending of that kind, and no year at which somebody decided to do it. A pastoral migration is not a policy, and the people who carried it out did not found anything, take a capital or leave a dynasty. They simply arrived, in numbers, over decades, and pastured over a country that had been under the plough since Carthage.

The shape they left

Which is the shape the region kept. Ifriqiya without an agricultural interior, governed from the coast, with a tribal hinterland that the state negotiated with rather than administered — that is the country the Almohads took, and the country the Hafsids inherited from them and ran for three centuries afterwards.

Arabic in the countryside

Drafted from Abun-Nasr, A History of the Maghrib in the Islamic Period (1987)afterlife

The Zirids lost Mahdia in 1148 and the last of them died under Almohad protection in 1167. What they left is a country and a language, and neither of them was anything the dynasty intended.

The country

Ifriqiya after the Zirids is a different kind of place from Ifriqiya before them, and it stayed that way.

Before 1050 it was what it had been since Carthage: an agricultural province with a dense settled interior of olives and grain, taxed by a government in a city on the plain. After the Hilalian migration it was a coastal strip of ports with a pastoral hinterland that no state administered — that negotiated with tribes, subsidised them, married into them and occasionally fought them, but did not collect a land tax from them in any systematic way.

Every government that followed inherited that arrangement and none of them reversed it. The Almohads took the coast and dealt with the interior. The Hafsids ruled Tunis for three centuries on exactly the same basis. So did the Ottomans, and so, in its own way, did the French protectorate.

A country's political geography was reset in about twenty years by people who were not trying to govern it.

The language

The larger change is the one Ibn Khaldun argued about and the maps still show.

Before the Banu Hilal, the Maghreb was a Berber-speaking country with Arabic in the cities — the language of religion, law, administration and long-distance trade, spoken by townsmen and scholars, in a countryside that spoke something else. Four centuries of Arab rule had not altered that, because conquest and government do not change what people speak at home.

What changed it was the arrival of large numbers of Arabic-speaking pastoralists who lived in the countryside, moved through it and married into it. Within a few generations Arabic was a rural language in North Africa, and the Berber-speaking areas had contracted to the mountains and the desert margins where they largely remain.

Ibn Khaldun, writing at Tunis three hundred years later, treats the migration as the catastrophe that ruined the Maghreb, and his account has been argued over ever since — modern historians are divided about how much decline it actually caused and how much was blamed on it afterwards. The linguistic outcome is not in dispute. The language map of North Africa today is substantially what the eleventh century made.

What it was retaliation for

A liturgical formula.

Al-Mu'izz ibn Badis changed the name in the Friday sermon in 1048 because his subjects were Sunni and he was tired of paying for a Shi'i caliph's unpopularity. Cairo could not reach him with an army and did not try. It gave two Arab confederations that were causing trouble in Upper Egypt permission to go west, and their grandchildren were pasturing sheep over the olive groves of the richest province in Africa.

Whether the Fatimid vizier who arranged it foresaw any of that is not recoverable. The likeliest reading is that Cairo was solving a problem in Upper Egypt and was pleased to have a use for it. The Maghreb got the consequences, and has them still.

Succession

What led here

  • 972Zirid Dynastyvassal ofFatimid Caliphate

    When al-Mu'izz went east to Cairo he left Ifriqiya to the Sanhaja family that had held the central Maghreb for him, as viceroys with the whole western half of the caliphate under them.

What led away

  • 1148Zirid Dynastyconquered byKingdom of Sicily

    Roger II's fleet took Mahdia and the Tunisian ports, which the Sicilian kingdom held as tributaries for about a decade before the Almohads took them.

  • 1160Almohad Caliphateabsorbed remnants ofZirid Dynasty

    The Almohads took the Tunisian coast back from the Normans a decade after Mahdia fell, and the last Zirid died under their protection in 1167.

Contemporaries

81 overlapping

The 12 that overlapped longest, in date order.

Show the remaining 67

Possibly, depending on which dates you accept

Derived from cited spans, not from a separate source. Where both spans are ranges and they meet only on the widest reading of each, the pair is listed as possible rather than resolved to one answer. Unlinked entries are here for scale and are not written up.

Extent

The historical-basemaps snapshots are world maps at fixed years, and none of the ones falling inside this polity's lifetime names it among the polities it draws.

Rating

Four axes, all computed from cited numbers and never from editorial judgement. Percentiles are against every polity written up here — 280 of them — plus 50 more included for scale. Absolute figures. A missing axis is excluded from the total rather than counted as zero.

Reach

No cited figure

Longevity

176 years

45th percentile

Demographic weight

No cited figure

Influence

Three separate counts. This site never publishes a single influence number of its own; the sliders on the rankings view fuse them only in your view.

Descendant scripts

No cited figure

Religions carried

No cited figure

Successor claims

No cited figure

Weighted total

45th percentile

computed from 1 of 4 axes, renormalised across the axes that have figures. A polity with two documented axes is not penalised against one with four.