Al-Mansur Ali II (1812–1871) was an Imam of Yemen who reigned in the capital San'a during four brief terms (1835–1837, 1844–1845, 1849–1850, 1851). He belonged to the Qasimid family, descended from the Islamic prophet, Muhammad, which dominated the Zaidi imamate of Yemen from 1597 to 1962.
Ali bin Abdallah was the son of Imam al-Mahdi Abdallah and an Ethiopian consort. When his father died in November 1835 after a turbulent reign, Ali was able to claim the imamate, under the name al-Mansur Ali. Nevertheless he lacked some of the qualifications for an imam. Two Britons called Cruttenden and Hurton visited San'a in 1836 and related their meeting with the imam. Al-Mansur Ali was described as a young man of dark complexion. On occasions when the two foreigners met the imam, the latter got exceedingly drunk, as did the attending dancing-girls. The visitors also related that San'a was in the grip of a severe famine, since no rain had fallen in four years. Al-Mansur Ali II was deposed by his own troops on 9 February 1837, since their salary was in arrears. They replaced him with an-Nasir Abdallah, a prominent Zaidi scholar in his own right. The ex-imam and his uncle Sidi Muhammad were imprisoned and stayed in confinement for the next three years.
After the violent death of an-Nasir Abdallah in 1840, al-Mansur Ali and Sidi Muhammad were released, and the latter was made imam, as al-Hadi Muhammad. Al-Mansur Ali received an allowance but was forbidden to interfere in state affairs. After the death of his uncle in January 1844, al-Mansur Ali was once again raised to the imamate, almost without opposition. In the same year he undertook a military campaign to subdue the lowlands of Yemen, Tihamah, which had been lost for the Zaidi state since 1832. After having been evacuated by Egyptian troops in 1840, the Tihamah was dominated by Sharif al-Husayn bin Ali bin Haidar of Abu Arish (d. 1851). Imam Al-Mansur Ali had some initial successes and issued a proclamation from Qataba where he enjoined various chiefs to submit to Zaidi rule. Some actually did, though by far the most abstained. Al-Mansur Ali's enterprise was interrupted by a revolt by his uncle al-Qasim, and an outbreak of smallpox. Eventually a relative called Muhammad bin Yahya claimed the imamate and appeared before San'a with an army of tribesmen in 1845. The inhabitants declared for the claimant, and al-Mansur Ali was once again deposed. He was given an allowance and permitted to live in one of the palaces of the city. The usurper took the name al-Mutawakkil Muhammad.
The Ottoman Turks returned to the Tihamah in 1849 and al-Mutawakkil Muhammad was summoned to submit. The imam accompanied a Turkish army to San'a. However, the day after the arrival of the detachment to the city, it was furiously attacked by the locals, supposedly enjoined by the imam. The Turkish commander Tefvik Pasha, who was badly wounded, immediately deposed al-Mutawakkil Muhammad and raised al-Mansur Ali to the imamate for the third time. Soon after, the Turks retreated to Hudaydah in the Tihamah. With the Turks gone, the power struggles continued in the rump Zaidi state. Al-Mansur Ali threw al-Mutawakkil Muhammad in prison and had him beheaded in December 1849. In June 1850 he was deposed for the third time by a rising headed by a distant relative called al-Mu'ayyad Abbas.
When al-Mu'ayyad Abbas was imprisoned by yet a rival imam, al-Mansur Ahmad, al-Mansur Ali collected a force of Hashid and Bakil tribesmen, surrounded San'a, and forced the rival to flee. Thus he was formally appointed imam for the fourth time (February 1851). However, he was unable to prevail against other claimants. In the same year 1851, while he was out on an expedition to the central plateau, al-Mutawakkil Muhammad's son al-Hadi Ghalib rose against him. Al-Hadi was appointed imam, and he generously declined to take full vengeance on his father's murderer. Al-Mansur Ali, however, lost his property. He continued to live in the vicinity of San'a, and in 1870 reportedly co-wrote a letter that invited the Porte back to end the chaos of the highlands.