# Mahdids

Part of a series on the :
History of Yemen :
Timeline :
Ancient history
Kingdom of Awsan (c. 800 – c. 700 BC)
Kingdom of Saba' (c. 1200 – c. 275 CE)
Kingdom of Ḥaḑramawt (c. 1000 – c. 290 BCE)
Kingdom of Qatabān (c. 1000 – c. 200 AD)
Kingdom of Ma'in (c. 600 – c. 150 BCE)
Kingdom of Ḥimyar (c. 110 – c. 525 CE)
Axumite Yemen (c. 517 – c. 570 )
Sasanian Yemen (c. 570 – c. 630 ) :
Islamic history
First Islamic State (c. 622 – c. 632)
Rashidun Caliphate
Umayyad Caliphate
Abbasid Caliphate
Ziyadid dynasty
Najahid dynasty
Sulayhid dynasty
Zurayids (266–316)
Hamdanids (304–439)
Mahdids (304–439)
Ayyubid dynasty
Rasulid dynasty
Tahirid state (266–316)
Kathiri State (304–439) :
Modern history
Ottoman Eyalet
Qasimid state
Aden Protectorate
Ottoman vilayet
Mutawakkilite Kingdom
South Yemen (1967–1990)
North Yemen (1962–1990)
Unified Yemen (1990-present) :
Related topics
Yemeni unification
1994 Civil War
Yemeni revolution
Civil war (2014–present)
COVID-19 pandemic
Red Sea crisis :
Yemen portal :
vte :
The Mahdids (Arabic: بني مهدي, romanized: Banī Mahdī) were a dynasty in Yemen who briefly held power in the period between 1159 and 1174.

## Conquest of the Tihama

Their name is derived from their first ruler Ali bin Mahdi who was born in Tihama. Ali bin Mahdi in his turn, traced his ancestry back to the ancient kings of Himyar. He was a religious and wide-travelled figure who performed the hajj every year and met scholars from all over the Muslim world. In 1136–1142 Ali bin Mahdi propagated his religious ideas in the Tihama lowland which at that time was ruled by the Najahids of Zabid. The Najahid queen 'Alam was initially attracted by his teachings and even exempted him and his followers from paying the kharaj. Building up a power base, he gathered an army in 1143 and attacked his benefactors. He made efforts to conquer the town al-Kadrā north of Zabid. This, however, failed. Ali and his followers withdrew to the mountains but were allowed back to the Najahid realm in 1146 at the insistence of queen 'Alam. After the death of the queen in 1150 a devastating war flared up between the Mahdids and Najahids. Ali subsequently tried to reach his aims by means of intrigues, undermining the Najahid regime which at this time was dominated by wazirs. His ambitions led to the murder of the leading Najahid figure Surūr al-Fātikī in 1156. The people of Zabid called in assistance from the Zaidiyyah imam al-Mutawakkil Ahmad in 1158 to meet the acute threat from the Mahdids, and promised to acknowledge him as their lord. The last Najahid ruler, al-Fatiq III, was murdered soon after by the imam or by his own guards. The imam, however, was unable to remain in Zabid for long and withdrew. Ali bin Mahdi established himself in the city but died soon after, in 1159.

## Mahdid rule

Ali bin Mahdi was succeeded by his son Mahdi bin Ali, possibly co-ruling with his younger brother Abd an-Nabi. The sons of Ali consolidated the power relations in the Tihama. An advantageous peace was concluded with the Zurayids of Aden. At the same time the Mahdids attacked other areas in the south such as Lahij and Abyan in order to gain plunder. Mahdi bin Ali died in 1163 and his brother Abd an-Nabi gained full control. He was reputed as an exceedingly strict lord who imposed death penalty for anyone opposing his teachings, and for wine drinking, singing and illicit sexual intercourse (although other sources suggest that he was himself a drunkard and womanizer). He upheld egalitarian principles of common property within the community. Muslim historians usually denounce him as a half-crazed robber with world-ruling ambitions.

## Ayyubid conquest

Abd an-Nabi carried on the expansive policy of the dynasty, attacking the Sulaymanids in northern Tihama whose territories were annexed. The cities Ta'izz and Ibb fell in 1164 and Aden was besieged in the same year. The Zurayids of Aden allied with the Hamdanid sultan of San'a in 1172. Together they managed to defeat the Mahdid forces in 1173. Abd an-Nabi withdrew to Zabid. Shortly after these events, the Ayyubid prince Turan Shah led an expedition to southern Arabia. One of the motives of the Ayyubids to invade Yemen was reportedly the stance of the Mahdids who were considered heretics and associated by outsiders with the Kharijites. Moreover, they had stopped mentioning the Abbasid caliph in the Friday prayer, making them a legitimate object of conquest. Turan Shah found a willing ally in the Sulaymanids, whose ruler had been slain by the Mahdids nine years previously. The Ayyubid troops quickly overran the bulk of Yemen and took Zabid on 13 May 1174. The city was looted and Abd an-Nabi and his brother Ahmad were taken prisoners. Both of them were strangulated in 1176, probably due to an attempt to revive Mahdid rule, and with them the brief era of the Mahdids came to an end.
The Mahdids were, after the Hamdanid sultans, the Zurayids and the Sulaymanids, the fourth Yemeni dynasty that was superseded by the Ayyubids.