Capture of Córdoba (1016)
The Capture of Cordoba was a battle of the Fitna of al-Andalus, that took place in the city of Córdoba, between the Berber Zenata forces of Ali ibn Hammud al-Nasir and his brother Al-Qasim al-Ma'mun, assisted by Zawi ibn Ziri and the Amirid ruler of Almería Khayran al-Amiri, against Caliph Sulayman ibn al-Hakam. The battle resulted in an allied victory followed by the execution of Sulayman al-Musta'in and rise of Ali ibn Hammud al-Nasir as the new caliph of Córdoba on June 1016.
Background
After the Córdoba (1009–1013) and rise of Sulayman ibn al-Hakam to the throne, he rewarded his berber allies with lands and cities, from those there were the Hammudids and their Zenata followers, who took Málaga and Algeciras, Ceuta and Tangier, and the Sanhaja who took Elvira and ruled in Granada.
Battle
Ali ibn Hammud al-Nasir, the Hammudid ruler of Ceuta was not satisfied with Sulayman ibn al-Hakam, he rose in revolt, and crossed to Málaga, after negotiations he secured support of his brother Al-Qasim al-Ma'mun, Zawi ibn Ziri and Khayran of Almería, the coalition reached Córdoba where they defeated Sulayman who was protected by Córdoban city militias that were useless against the professional Berber regiments, and the city was captured on June 1016, Sulayman ibn al-Hakam was captured on 1 July 1016 and executed by Ali after knowing about the death of Hisham II.
Aftermath
Ali ibn Hammud al-Nasir took control of the city, and became the first non Umayyad-Spaniard caliph to ever rule in Córdoba, however he was overthrown and killed in 1018 and his brother Al-Qasim al-Ma'mun succeeded him as Caliph.