before Malaga Yahyā al-Qa`im fled. Hasan pretended to forgive him but killed him soon after (1040). Al-Hasan is poisoned by his wife, sister of the deceased Yahyā al-Qa`im, who thus avenges her brother (1043). In this case, Nadja, the eunuch vizier of Al-Hasan who had brought him to power, thought to take power for himself. He sets out to take Algeciras held by Muhammad al-Mahdī, son of al-Qāsīm al-Mā'mūn, since the death of his first cousin Yahyā al-Mu`talī. Najah was killed during this campaign (February 5, 1043)). Idrīs II al-`Alī, brother of al-Hasan took over at Malaga. Idrīs II was a peaceful ruler, but some found him too weak. Muhammad, a cousin of Idrīs II, son of Idrīs I al-Muta'ayyid, was pushed to power by the African military (1047). This new ruler was the exact opposite of Idrīs II. This new ruler was the exact opposite of the previous one; those who had found Idrīs too weak found Muhammad too severe. A new coup was organized to restore Idrīs and overthrow Muhammad. Idrīs was nevertheless forced to take refuge in Africa, where he was received by the Berber governors of Tangier and Ceuta. The latter, fearing that their host would dispossess them, sent him back to Spain while continuing to call themselves his vassals. Idrīs found refuge in Ronda. The disgruntled people of Malaga called for help from the Zirid Badis ben Habus, who had been ruling over Granada since 1038. He seized Malaga in 1053, either for himself or on behalf of his suzerain Idrīs II, who had been ousted in 104721. The throne was taken by Muhammad al-Mahdī al-Mu`tarim, son of Idrīs I al-Muta'ayyid (1047), and then by Idris III al-Muwaffaq, son of Yahya II al-Qa`im (1053), for a very brief reign. Idrīs II al-`Alī was finally restored (1054). The latter was then very old and died in 1055. Muhammad al-Musta`lī, another son of Idrīs I al-Muta'ayyid, ascended the throne, but it was Badis who took complete power in Malaga in 1058, thus putting an end to the Hammudite dynasty. References Bibliography 11th-century Arabs Shia dynasties Dynasties in al-Andalus Arabs from al-Andalus Hasanid dynasties Caliphate of Córdoba 11th century in Al-Andalus