In 711, the Moors, after the Umayyad conquest of Hispania, conquered large parts of the Iberian Peninsula, thus establishing Al-Andalus (Moorish Spain). Meanwhile, Jewish people had established a small community some twenty miles north of Illiberis, called Gárnata or Gárnata al-yahūd ("Granada of the Jews").
The actual founding of present day Granada took place in the 11th century, during a civil war that ended the Caliphate in the early 11th century. In the aftermath of these wars, the Berber general Ziri ibn Manad established an independent kingdom for himself, with Elvira as its capital. Because the city was situated on a low plain and, as a result, difficult to protect from attacks, the Zirid ruler decided to transfer his residence to the higher situated hamlet of Gárnata. In a short time this village was transformed into one of the most important cities of Al-Andalus. By the end of the 11th century, the city had spread across the Darro to reach the hill of the future Alhambra, and included the Albayzín (also Albaicín or El Albaicín) neighborhood (a world heritage site). The Almoravid and Almohad dynasties ruled Granada in this period.