Mahdids

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.

Ali subsequently tried to reach his aims by means of intrigues, undermining the Najahid regime which at this time was dominated by wazirs.

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.

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).

[2] Abd an-Nabi carried on the expansive policy of the dynasty, attacking the Sulaymanids in northern Tihama whose territories were annexed.

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.

[citation needed] The Mahdids were, after the Hamdanid sultans, the Zurayids and the Sulaymanids, the fourth Yemeni dynasty that was superseded by the Ayyubids.

Yemeni States around 1160 AD