Al-Qasim bin Ali was a Sayyid from Tarj in the Khath'am region. His year of birth is given as 922 or 928. He was a great-great-grandson of al-Qasim ar-Rassi, a key figure in the emerging of the Zaydiyyah brand of Shi'a Islam. He received a reputation for religious learning from early age. For decades, Zaidi figures from Yemen visited him and asked him to intervene in the Yemeni highland. After the death of the Zaidi imam an-Nasir Ahmad in 934, political conditions had been unstable in the Zaydiyyah-influenced areas. In 993, al-Qasim proclaimed the imamate in Tihamah, but his movement was defeated in the next year by the governor of Mecca. Still, the Fatimid caliph treated al-Qasim with respect and courtesy.
Imam in Yemen
Al-Qasim invaded Yemen in 997 or 998 and appropriated Sa'dah, the traditional capital of the Zaydiyyah domain. As imam he was known as al-Mansur a-Qasim. He subsequently returned to Tarj, and his power in Yemen immediately crumbled. He then returned again, permanently, in 999. This time he was able to extend his power over an extensive area from Bilad Khath to San'a. However, he could not secure an outlet to the sea, and the lowland of Yemen was subjected to the Ziyadid dynasty in Zabid. Al-Mansur al-Qasim resided in Iyyan, south-east of Sad'ah, and therefore became known as al-Iyyani. He called on certain tribes to perform military service. One of his adherents composed a poem which emphasized the enthusiastic response among the tribesmen, and the role of the imam as a restorer: "Rise and lead the people, and send them with justice; remove darkness and ignorance from them. Restore the religion of your ancestor after it had disappeared, and inflict death upon your opponents."
Abdication
His position was nevertheless precarious, since other Rassids claimed power over the Zaydiyyah community. After his failure to subdue the recalcitrant tribesmen of Banu Harith in Najran, he faced opposition from al-Malih Ibrahim and the former imam ad-Da'i Yusuf. The governor in Dhamar, az-Zaidi, rebelled and captured the imam's son Ja'far. A reconciliation took place in 1002. Az-Zaidi offered al-Mansur al-Qasim al-Iyyani to retain power over Bakil and Wada. The imam, however, preferred to retire from governance altogether. He lived a private life in Madhab and Iyyan where he wrote a text to his defence. He died in the following year in Iyyan. As a religious scholar, he followed al-Qasim ar-Rassi and al-Hadi ila'l-Haqq Yahya in the essentials, although he was also accused of theological deviations. After his death, the imamate was contested between his son al-Mahdi al-Husayn and the old imam ad-Da'i Yusuf.