Al-Mahdi Ahmad bin al-Husayn (1216-1258) was an imam of the Zaidi state in Yemen who ruled in the period 1248–1258.
His exact relationship to previous imams of Yemen is disputed, but according to one pedigree he was a descendant of al-Qasim ar-Rassi (d. 860) in the eleventh degree.
The Zaidi positions were helped through the murder of the powerful Rasulid sultan Nur ad-Din Umar in 1250.
In the same year, al-Mahdi Ahmad managed to seize San'a, where the Rasulid kinsman Asad ad-Din governed.
[3] Al-Mahdi Ahmad entered into negotiations with al-Muzaffar Yusuf, the new sultan of the Rasulid Dynasty which ruled much of Yemen from the lowland.
Dissatisfied Zaidis rallied behind Shams ad-Din Ahmad, a son of al-Mansur Abdallah, whom they proclaimed imam in 1254.
[6] Shams ad-Din took command over the insurgents and received support from the Rasulid sultan al-Muzaffar Yusuf.