between muwallads (Muslim converts) who were loyal to the central government and Arabs, led by Sawwār ibn Ḥamdūn, who resented them. At the beginning of the 11th century, the area became dominated by the Zirids, a Sanhaja Berber group and offshoot of the Zirids who ruled parts of North Africa. This group became an important contingent in the army of ʿAbd al-Malik al-Muẓaffar, the prime minister of Caliph Hisham II (r. 976–1009) and successor to Ibn Abi ʿAmir al-Mansur (Almanzor) as de facto ruler of the Caliphate of Córdoba. For their service, the Zirids were granted control of the province of Elvira. When the Caliphate collapsed after 1009 and the Fitna (civil war) began, the Zirid leader Zawi ben Ziri established an independent kingdom for himself, the Taifa of Granada. Arab sources such as al-Idrisi consider him to be the founder of the city of Granada. His surviving memoirs – the only ones for the Spanish "Middle Ages" – provide considerable detail for this brief period. Because Madīnat Ilbīra was situated on a low plain and, as a result, difficult to protect from attacks, the ruler decided to transfer his residence to the higher situated area of Ġarnāṭa. According to Arabic sources Ilbīra was razed during the Fitna, afterwards it was not restored at its previous place and instead Ġarnāṭa, the former Jewish town, replaced it as the main city. In a short time this town was transformed into one of the most important cities of al-Andalus. Until the 11th century it had a mixed population of Christians, Muslims, and Jews. The Zirids built their citadel and palace, known as the al-Qaṣaba al-Qadīma ("Old Citadel"), on the hill now occupied by the Albaicín neighborhood. It was connected to two smaller fortresses on the Sabika hill (site of the future Alhambra) and Mauror hill to the south. The city around it grew during the 11th century to include the Albaicín, the Sabika, the Mauror, and a part of the surrounding plains. The city was fortified with walls encompassing an area of approximately 75 hectares. The northern part of these walls, near the Albaicin citadel, have survived to the present day, along with two of its gates: Bāb al-Unaydar (now called Puerta Monaita in Spanish) and Bāb al-Ziyāda (now known as Arco de las Pesas or Puerta Nueva). The city and its residences were supplied with water through an extensive network of