Proclamation and expansion Al-Mansur al-Qasim proclaimed the Imamate in September 1597, which was the same year the Ottoman authorities inaugurated
al-Bakiriyya Mosque. By 1608, Imam al-Mansur had regained control over the highlands and signed a ten-year truce with the Ottomans. When al-Mansur al-Qasim died in 1620, his son
al-Mu'ayyad Muhammad succeeded him and reconfirmed the truce with the Ottomans. In 1627, the Ottomans lost
Aden and
Lahej. 'Abdin Pasha was ordered to suppress the rebels but failed and had to retreat to
Mokha. The reasons behind his success were the tribes' possession of
firearms and the fact that they were unified behind him. was Yemen's busiest port in the 17th and 18th century. In 1632, al-Mu'ayyad Muhammad sent an expeditionary force of 1000 men to conquer
Mecca. The army entered the city in triumph and killed its governor. Ottoman troops attacked the Yemenis by hiding at the wells that supplied them with water. This plan succeeded, inflicting 200 casualties, most from thirst. By 1636, the Zaydis had driven the Ottomans out of the country completely. Al-Mu'ayyad Muhammad died in 1644. He was succeeded by
Al-Mutawakkil Isma'il, another son of al-Mansur al-Qasim, who conquered Yemen in its entirety, from
Asir in the north to
Ẓafār in the east.
Consolidation (17th-18th centuries) During al-Mutawakkil Isma'il reign and that of his successor, al-Mahdi Ahmad (1676–1681), the Imamate implemented some of the harshest
sumptuary laws () against the Jews of Yemen, which culminated in the
Mawza Exile to a hot and arid region in the
Tihamah. The Qasimid state was the strongest Zaydi state that ever existed. Upon the death of the Imam in 1681, his son Muhammad was prevented from assuming the Imamate due to counter-claims by relatives in Rada,
Shaharah,
Sa'dah and Mansura. Through mediation of the
ulama (religious scholars), one of these,
al-Mu'ayyad Muhammad II, took power. Al-Mu'ayyad Muhammad II was not a warlike leader, but rather an
ascetic and deeply religious personality who was devoted to learning. The well-known scholar and writer
al-Shawkani considered him one of the most righteous Imams. He died in 1686 in Hamman Ali in the Anis region, possibly from poisoning. The deceased Imam was buried in Jabal Dawran, alongside his father. Seven contenders claimed the succession after him in only three years; of these,
al-Mahdi Muhammad finally gained power in 1689 after a violent struggle. A broader
theological and political shift took place during this period. Increasing interactions with
Hanafi and
Shafi'i schools of Sunni Islam led to an ideological shift in the prevalent form of Zaydism. While the rulers ostensibly conformed to Hadawi law (thus the "imamate"), the doctrines had to be modified to allow hereditary, as opposed to traditional merit-based, selection of imams. This transition did not happen abruptly, but through a long-lasting process that had its roots in the fifteenth century. This process was termed "Traditionism" by scholar
Bernard Haykel.) Traditionism saw the gradual merging of Zaydi doctrine with elements of Shafi'i thought. By the mid-eighteenth century, the rulers of the Qasimid State had become dynastic, a more formal state
bureaucracy was established, and the traditional Zaydi notion of
khurūj (revolt against unjust rule) was deemed unacceptable. Under the newly bureaucratic system, education and courts became more
centralized; a variety of new offices such as
chamberlains were created; and there was a move away from a tribal military to one that was mainly composed of
slaves. In 1728 or 1731, the chief representative of
Lahij declared himself an independent
sultan in defiance of the Qasimid Dynasty and conquered
Aden, thus establishing the
Sultanate of Lahej. In 1740, the 'Abdali sultan of Lahij became completely independent. It became independent thanks to the fracturing of the Zaidi state in northern Yemen. The Sultanate of Lahej became an independent entity, from 1728 to 1839. The rising power of the fervent
Wahhabi movement cost the Zaidi state its coastal possessions after 1803. The imam was able to regain them temporarily in 1818, but new intervention by
Muhammad Ali of Egypt in 1833 again wrested the coast from the ruler in Sana'a. After 1835, the imamate changed hands with great frequency and some imams were assassinated. After 1849, the Zaidi polity descended into chaos that lasted for decades. ==Economy==