The Taifa kingdoms (1031-1212) were the small Muslim states into which al-Andalus broke after the abolition of the Caliphate of Cordoba. 'Taifa' comes from the Arabic for 'faction' or 'party', and the era saw some three dozen local dynasties, Arab, Berber and saqaliba (slave-soldier) in origin, ruling from the great cities: Seville, Granada, Toledo, Badajoz, Valencia, Zaragoza and others. The breakup followed the Fitna, the civil war unleashed after the death of Almanzor's house, and it left Muslim Spain divided just as the Christian kingdoms of the north were pressing south.
Politically weak, the taifas were culturally brilliant. Courts competed for poets, scholars, scientists and artists, and the eleventh century became a golden age of Andalusi letters: the poet-king al-Mutamid ruled a Seville famous for its salons, Ibn Hazm of Cordoba wrote his treatise on love and his studies of religions, and astronomy, agronomy, philosophy and medicine flourished. The taifa rulers built and beautified palaces such as the Aljaferia of Zaragoza and the Alcazabas of Malaga and Almeria, whose fleets briefly made it the richest port of the western Mediterranean.
The taifas bought security with parias, heavy tribute paid to the Christian kings, a flow of gold that financed the Reconquista and Romanesque building in Leon and Castile. When Alfonso VI took Toledo in 1085, al-Mutamid of Seville decided that he would rather 'herd camels for the Almoravids than pigs for Castile', and called in the Almoravids, the austere Berber reform movement ruling Morocco. The Almoravid emir Yusuf ibn Tashfin crushed Alfonso at Zallaqa (1086), then returned, and by 1094 he had annexed the taifas themselves, resentful of their luxury and religious laxity, reuniting al-Andalus under Marrakesh.
Almoravid rule decayed in the next generation, and a second, shorter taifa period followed before the Almohads, a new Berber movement preaching strict monotheism, crossed from Africa after 1147 and subdued Muslim Spain. Almohad power broke on the plain of Las Navas de Tolosa (1212), where the combined armies of Castile, Aragon and Navarre destroyed Caliph al-Nasir's army. Al-Andalus then collapsed into a third round of taifas, which the Christian kingdoms swallowed one by one, Cordoba (1236), Valencia (1238), Seville (1248), until only Granada remained. The taifa age thus frames both the cultural peak of al-Andalus and the turning of the Iberian balance permanently toward the Christian north.