The Hammudid dynasty was an Arab Muslim family that briefly ruled the Caliphate of Córdoba[1] [2] and the taifas of Málaga and Algeciras and nominal control in Ceuta.
The dynasty is named after their ancestor, Hammud, a descendant of Idris ibn Abdallah, founder of the Idrisid dynasty and great-grandchild of Hasan, son of Fatimah and Ali and grandson of the Islamic prophet, Muhammad.[3] When Sulayman ibn al-Hakam carved out Andalusian land for his Berber allies, two members of the Hammudid family were given the governorship of Algeciras, Ceuta and Tangier. The Hammudids thus gained control of the traffic across the Straits of Gibraltar, suddenly becoming a powerful force. Claiming to act on behalf of the dethroned Hisham II, the Hammudid governor of Ceuta Ali ibn Hammud al-Nasir marched upon Córdoba in the year 1016, where he was crowned Caliph.
In 1056, the last Hammudid Caliph was dethroned, losing Málaga to the Zirids of Granada, who had previously been the Hammudids' most important supporters. The Hammudi family was then forced to settle in Ceuta.