Meanwhile, negotiations collapsed between Ibn al-Zubayr and the Kufan strongman al-Mukhtar al-Thaqafi, who afterward took up the cause of the Alid family. He declared Ibn al-Hanafiyya caliph and, unprecedentedly in Islamic history, the "mahdī". Al-Mukhtar's partisans drove out the Zubayrid authorities from Kufa in October 685. Al-Mukhtar later dispatched a Kufan force to the Hejaz and freed Ibn al-Hanafiyya. Mus'ab's authority in Basra and Khurasan was also beginning to waver, but was ultimately secured after he gained the backing of the powerful Azdi chieftain and military leader of Khurasan, al-Muhallab ibn Abi Sufra. Mus'ab also gained the defections of thousands of Kufan tribesmen and together they defeated and killed al-Mukhtar in April 687. Ibn al-Zubayr subsequently dismissed Mus'ab from office in 686/87 and appointed his own son Hamza as governor of Basra. The latter dispatched a force under Abd Allah ibn Umayr al-Laythi to drive out the Najdiyya Kharijites from Bahrayn after they overran the province, but the Zubayrids were repulsed. Hamza proved incompetent in his administration of Iraq and following his failure to deliver the provincial revenues to the state treasury in Mecca, he was dismissed and allegedly imprisoned by his father. Mus'ab was reinstated shortly after, in 687/88. By that year, the Najdiyya Kharijites conquered Yemen and Hadhramawt, while in 689, they occupied Ta'if, Mecca's southern, uphill neighbor.