"Deserted and roofless are the houses of our enemies; Invaded by the autumnal rains, traversed by impetuous winds; Let them within the red castle (Kalat al hamra) hold their mischievous councils; Perdition and woe surround them on every side." At the beginning of the 11th century, the region of Granada was dominated by the Zirids, a Sanhaja Berber group and offshoot of the Zirids who ruled parts of North Africa. When the Caliphate of Córdoba 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. The Zirids built their citadel and palace, known as the al-Qaṣaba al-Qadīma ("Old Citadel" or "Old Palace"), on the hill now occupied by the Albaicín neighborhood. It was connected to two other fortresses on the Sabika and Mauror hills to the south. On the Darro River, between the Zirid citadel and the Sabika hill, was a sluice gate called Bāb al-Difāf ("Gate of the Tambourines"), which could be closed to retain water if needed. This gate was part of the fortification connecting the Zirid citadel with the fortress on the Sabika hill and it also formed part of a coracha (from Arabic qawraja), a type of fortification allowing soldiers from the fortress to access the river and bring back water even during times of siege. The Sabika hill fortress, also known as al-Qasaba al-Jadida ("the New Citadel"), was later used for the foundations of the current Alcazaba of the Alhambra. Under the Zirid kings Habbus ibn Maksan and Badis, the most powerful figure in the kingdom was the Jewish administrator known as Samuel ha-Nagid (in Hebrew) or Isma'il ibn Nagrilla (in Arabic). Samuel built his own palace on the Sabika hill, possibly on the site of the current palaces, although nothing remains of it. It reportedly included gardens and water features. Nasrid period The period of the Taifa kingdoms, during which the Zirids ruled, came to an end with the conquest of al-Andalus by the Almoravids from North Africa during the late 11th century. In the mid-12th century they were followed by the Almohads. After 1228 Almohad rule collapsed and local rulers and factions emerged again across the territory of Al-Andalus. With the Reconquista in full swing, the Christian kingdoms of Castile and Aragon – under kings Ferdinand III and James I, respectively – made major conquests across al-Andalus. Castile