Realizing how rich the Tahiride realm was, they decided to conquer it. The Mamluk army, with the support of forces loyal to Zaydi Imam Al-Mutawakkil Yahya Sharaf ad-Din, conquered the entire realm of the Tahiride but failed to capture Aden in 1517. The Mamluk victory was short-lived. The Ottoman Empire conquered Egypt, hanging the last Mamluk Sultan in Cairo. The Ottomans had not decided to conquer Yemen until 1538. The Zaydi highland tribes emerged as national heroes by offering stiff, vigorous resistance to the Turkish occupation. The Mamluks of Egypt tried to attach Yemen to Egypt and the Portuguese led by Afonso de Albuquerque, occupied the island of Socotra and made an unsuccessful attack on Aden in 1513.
The Zaydis and Ottomans:
The Ottomans had two fundamental interests to safeguard in Yemen: The Islamic holy cities of Mecca and Medina, and the trade route with India in spices and textiles—both threatened, and the latter virtually eclipsed, by the arrival of the Portuguese in the Indian Ocean and the Red Sea in the early 16th century.Hadım Suleiman Pasha, The Ottoman governor of Egypt, was ordered to command a fleet of 90 ships to conquer Yemen.
Imam al-Mutawakkil Yahya Sharaf ad-Din ruled over the northern highlands including Sana’a, while Aden was held by the last Tahiride Sultan ‘Amir ibn Dauod. Hadım Suleiman Pasha stormed Aden in 1538, killing its ruler, and extended Ottoman authority to include Zabid in 1539 and eventually Tihama in its entirety. Zabid became the administrative headquarters of Yemen Eyalet. The Ottoman governors did not exercise much control over the highlands. They held sway mainly in the southern coastal region, particularly around Zabid, Mocha, and Aden. Of 80,000 soldiers sent to Yemen from Egypt between 1539 and 1547, only 7,000 survived.
The Ottomans sent yet another expeditionary force to Zabid in 1547, while Imam al-Mutawakkil Yahya Sharaf ad-Din was ruling the highlands independently. Imam al-Mutawakkil Yahya chose his son Ali to succeed him, a decision that infuriated his other son al-Mutahhar ibn Yahya.Al-Mutahhar was lame, so he was not qualified for the imamate. He urged Oais Pasha, the Ottoman colonial governor in Zabid, to attack his father. Indeed, Ottoman troops supported by tribal forces loyal to Imam al-Mutahhar stormed Taiz and marched north toward Sana’a in August 1547. The Turks officially made Imam al-Mutahhar a Sanjak-bey with authority over ‘Amran. Imam al-Mutahhar assassinated the Ottoman colonial governor and recaptured Sana’a, but the Ottomans, led by Özdemir Pasha, forced al-Mutahhar to retreat to his fortress in Thula. Özdemir Pasha effectively put Yemen under Ottoman rule between 1552 and 1560. He was considered a competent ruler given Yemen’s notorious lawlessness, garrisoning the main cities, building new fortresses, and rendering secure the main routes. Özdemir died in Sana’a in 1561 and was succeeded by Mahmud Pasha.
Unlike Özdemir’s brief but able leadership, Mahmud Pasha was described by other Ottoman officials as a corrupt and unscrupulous governor. He used his authority to take over several castles, some of which belonged to the former Rasulid kings. Mahmud Pasha killed a Sunni scholar from Ibb.The Ottoman historian claimed that this incident was celebrated by the Zaydi Shia community in the northern highlands. Disregarding the delicate balance of power in Yemen by acting tactlessly, he alienated different groups within Yemeni society, causing them to forget their rivalries and unite against the Turks. Mahmud Pasha was displaced by Ridvan Pasha in 1564. By 1565, Yemen was split into two provinces, the highlands under the command of Ridvan Pasha and Tihama under Murad Pasha. Imam al-Mutahhar launched a propaganda campaign in which he claimed that the prophet Mohammed came to him in a dream and advised him to wage jihad against the Ottomans. Al-Mutahhar led the tribes to capture Sana’a from Ridvan Pasha in 1567. When Murad tried to relieve Sana’a, highland tribesmen ambushed his unit and slaughtered all of them. Over 80 battles were fought. The last decisive encounter took place in Dhamar around 1568, in which Murad Pasha was beheaded and his head sent to al-Mutahhar in Sana’a. By 1568, only Zabid remained under the possession of the Turks.