The Ubaydid al-Mahdi's triumph in the Maghreb and its departure from Abbasid rule

غلبة المهدي العبيدي على المغرب وخروجه من أمر بني العباس

c. 909 CE · c. 296 AH

Under al-Muqtadir the Mahdi's cause prevailed in the Maghreb: he was saluted as imam and caliph, built al-Mahdiyya, and the Aghlabid amir Ziyadat Allah fled to Egypt then Iraq — 'from this date the Maghreb left the Abbasids' command', after a hundred and sixty-odd years of their rule over all the Islamic realms. The Mahdi marched on Egypt with forty thousand Berbers; the Nile barred him, so he took Alexandria and the Fayyum, while his son al-Qa'im later seized most of Upper Egypt and the Fustat quarter 1.

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

Depth

At a glance

Era
The Early Abbasid Caliphate
Region
Maghreb · Egypt & Nile

In time

900910920 c.
Abbasid Fragmentation

Overview

In the days of al-Muqtadir the cause of al-Mahdi grew strong in the Maghrib, the caliphate was proclaimed for him, and the Maghrib left the command of the Abbasids. Ziyadat Allah ibn al-Aghlab fled to Egypt and then to Iraq. 2

The account

The source of the caliphs says that al-Mahdi spread justice among the people, built al-Mahdiyya, and his kingdom grew great. He marched toward Egypt with forty thousand Berbers, but the Nile came between him and it, so he returned to Alexandria. His son al-Qa'im took most of Upper Egypt. 2

Al-Mas'udi's account

According to al-Mas'udi, Abu Abd Allah al-Muhtasib, the propagandist among the Kutama and the Berbers, drove Ziyadat Allah out of Ifriqiya in 296 AH, and called for Ubayd Allah, the lord of the Maghrib. The Aghlabids had been the amirs of Ifriqiya since al-Rashid appointed Ibrahim ibn al-Aghlab in 184 AH. 3

Connections

Explore the connections

Had participant
Ubayd Allah al-Mahdi· Ziyadat Allah Iii
During the reign of
Ubayd Allah al-Mahdi

People and things also explored

Abu Abdallah al-Shi'i's entry into Raqqada and the collapse of the Aghlabid state· The Appearance of Abu Abd Allah al-Shi'i in the Maghreb· The end of the Aghlabid state and the flight of Ziyadat Allah· Capture of Tahert (909)· Death of al-Mahdi Ubayd Allah, ruler of the Maghrib· Fall of Kairouan (909)· Al-Nasa'i leaves Egypt for Damascus, Dhu al-Qa'da 302/915· al-Qa'im bi-Amr Allah Muhammad ibn al-Mahdi

Sources

  1. Tarikh al-Khulafa — al-Suyuti (Dar al-Minhaj edition) , p. 587-590
  2. Tarikh al-Khulafa — al-Suyuti (Dar al-Minhaj edition) , p.587-590
  3. Muruj al-Dhahab — al-Masʼudi , p.647-648
Cite this page

islam.museum contributors. “The Ubaydid al-Mahdi's triumph in the Maghreb and its departure from Abbasid rule”. islam.museum, https://islam.museum/en/event/fatimid-mahdi-maghreb/. 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

Abu Abdallah al-Shi'i's entry into Raqqada and the collapse of the Aghlabid state

In Rajab 296 Abu Abdallah al-Shi'i broke Ibrahim b. Abi'l-Aghlab's army, sent Ziyadat Allah fleeing to Egypt and entered Raqqada, quartering Kutama in its palaces and calling the aman — the Aghlabid state's end.