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. 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. ==References==