After 711 Muslim armies took nearly all of Hispania. Christians and Jews lived under Muslim rule as protected peoples who paid a special tax, and over the centuries many people converted to Islam. In the mountains of the north a small Christian kingdom, Asturias, survived; its chroniclers later made much of a victory at Covadonga, traditionally dated 722.
In 750 the Abbasids overthrew the Umayyad caliphs of Damascus and killed most of their family. One prince, Abd al-Rahman (founder of the emirate of Córdoba), escaped to al-Andalus and in 756 made himself emir at Córdoba. He began the Great Mosque of Córdoba, which his successors enlarged for two centuries.
Abd al-Rahman III (first caliph of Córdoba) declared himself caliph in 929, independent of the caliphs in Baghdad. He built a palace city, Madinat al-Zahra, outside Córdoba, and Córdoba grew into one of the largest cities in Europe, though estimates of its population vary widely. Scholars studied and translated Greek science and medicine, and Hasdai ibn Shaprut, a Jewish doctor and diplomat, served at the caliph’s court.
At the end of the 10th century the chief minister Almanzor (chief minister and war leader) ruled in the caliph’s name and led raids deep into the Christian north, sacking Santiago de Compostela in 997. After his death in 1002 the caliphate fell into civil war, and in 1031 it broke up into some two dozen small kingdoms, the taifas.