The Siege of al-Mahdiyya by Abu Yazid

حصار أبي يزيد للمهدية

945 CE · 333 AH

al-Mahdiyya

In 333, Abu Yazid Makhlad ibn Kaydad — 'the man of the donkey' — besieged the Ubaydid caliph al-Qa'im in al-Mahdiyya. Four assaults followed through the year; famine inside the walls grew so severe that the people ate beasts and carrion, and al-Qa'im opened the Mahdi's granaries to his men 1.

DraftWritten with AI help from the sources it cites, and not yet read by a human editor.

Depth

At a glance

Era
The Buyid, Fatimid and Seljuk Era
Region
Maghreb

In time

930940950960
Abbasid Fragmentation · The Buyid, Fatimid and Seljuk Era

In space

al-Mahdiyya

Map: Natural Earth, public domain · places and route from the graph

Wars and campaigns

Sides

The forces of al-Qa'im bi-Amr Allah Muhammad ibn al-Mahdi

al-Qa'im bi-Amr Allah Muhammad ibn al-Mahdi

The defenders of al-Mahdiyya

al-Mahdiyya

Overview

Ibn al-Athir reports that in 333 AH Abu Yazid Makhlad ibn Kaydad, the Man of the Donkey, besieged the Fatimid caliph al-Qa'im in al-Mahdiyya. 1

Before the siege

When the Sanhaja and Kutama prepared to support al-Qa'im, Abu Yazid grew afraid and moved toward al-Mahdiyya. He camped fifteen miles from it and sent out his raiding parties. Kutama and al-Qa'im's men agreed to come out against him, but he surprised them. His son reached him with a force from Qayrawan, and he defeated them and pursued them to Bab al-Fath. 1

In Jumada al-Akhira he advanced, crossed the wall and looked over the city until he reached its gate, near the prayer ground for the Eid. Then Ziri ibn Manad arrived with the Sanhaja, and Abu Yazid was bewildered. He moved to Tarfawda and dug a trench around his camp. 1

The siege

A great multitude gathered to him from Ifriqiya, the Berbers, Nafusa, al-Zab and the far Maghrib. He besieged al-Mahdiyya tightly and prevented people from entering and leaving. He made four assaults between Jumada al-Akhira and Shawwal. 1

The hardship on the people of al-Mahdiyya grew until they ate the beasts and carrion. al-Qa'im opened the granaries of al-Mahdi and distributed what was in them among his men. The narrator says that the Berbers killed anyone who came out and slit his belly in search of gold, until no inhabited place or raised roof remained in Ifriqiya. 1

The Gregorian conversion is derived. An additional source is needed to confirm the date.

Connections

Explore the connections

Had participant
Abu Yazid Makhlad· al-Qa'im bi-Amr Allah Muhammad ibn al-Mahdi· Ziri ibn Manad
Occurred at
al-Mahdiyya
During the reign of
al-Qa'im bi-Amr Allah Muhammad ibn al-Mahdi

People and things also explored

al-Mansur bi-Allah Isma'il ibn al-Qa'im· Ubayd Allah al-Mahdi· Ziri ibn Manad· al-Mahdiyya· Abu Yazid revolt (944–947)· Capture of Mahdia· Death of al-Mahdi Ubayd Allah, ruler of the Maghrib· Killing of Ziri ibn Manad al-Sanhaji, 360

Sources

  1. al-Kamil fi'l-Tarikh of Ibn al-Athir , p. 318-321
Cite this page

islam.museum contributors. “The Siege of al-Mahdiyya by Abu Yazid”. islam.museum, https://islam.museum/en/event/abu-yazid-siege-mahdiyya-333/. CC BY-SA 4.0. Last updated 2026-11-22.

Improve this page on GitHub · Report an error · Help complete it · JSON

Wing

Time

Eras, timelines, this day in history, any year in the Islamic world.
Related

al-Mansur bi-Allah Isma'il ibn al-Qa'im

Isma'il ibn al-Qa'im, third Ubaydid ruler; he founded al-Mansuriyya and died there, the best-conducted of the line after his grandfather al-Mahdi, abolishing the exactions — and his son Ma'add succeeded as al-Mu'izz li-Din Allah.