A taifa (from  ṭā'ifa, plural طوائف ṭawā'if) was an independent Muslim-ruled principality. Taifas developed during the history of Iberia. They were usually emirates or little kingdoms, but there was one oligarchy as well, Seville. A number were formed in the Al-Andalus (Moorish Iberia) after the end of the Umayyad Caliphate of Cordóba in 1031.

They developed because of an administrative division of the Umayyad Caliphate of Córdoba and an ethnic division of its elite. It was divided among Arabs (a powerful but tiny minority), Berbers, Eastern European former slaves and Iberian Muslims (known as Muladíes (the great majority). 

There was a second period when taifas developed: the middle of the 12th century, when the Almoravid dynasty was in decline.

In the 11th century and again in the mid 12th century, the emirs (rulers) of the taifas kept fighting among themselves, not only militarily but also for cultural . They tried to recruit the most famous poets and artisans.

After the end of the Caliphate, the rival Muslim kingdoms were much weaker than the Christian ones and so they had to submit and to pay tribute. 

The taifa princes appealed for North African warriors to help them fighting Christian kings on two occasions. The Almoravids were invited after the fall of Toledo (1085), the Almohads after the fall of Lisbon (1147). The warriors did not help the taifa emirs but rather annexed their lands to their own North African empires.

Taifas often hired Christian mercenaries to fight neighbouring realms (both Christian and Muslim). The most dynamic taifa, which conquered most of its neighbours before the Almoravid invasion, was Seville. Zaragoza was also very powerful and expansive, but was kept in check by the neighbour Christian states of the Pyrenees. Zaragoza, Toledo and Badajoz had previously been the border military districts of the Caliphate.

List of taifas

First period (11th century) 
 Albarracín: 1011–1104 (to Almoravids)
 Algeciras: 1035–58 (to Seville)
 Almería: 1011–91 (to Almoravids)
 Alpuente: 1009–1106 (to Almoravids)
 Arcos: 1011–68 (to Seville)
 Badajoz: 1009–1094 (to Almoravids)
 Carmona: 1013–91 (to Almoravids)
 Ceuta: 1061–84 (to Almoravids)
 Córdoba: 1031–91 (to Seville)
 Denia: 1010/12–76 (to Zaragoza)
 Granada: 1013–90 (to Almoravids)
 Lisbon: 1022–? (to Badajoz)
 Lorca: 1051–91 (to Almoravids)
 Málaga: 1026–57/58 (to Granada); 1073–90 (to Almoravids)
 Majorca: 1076–1116 (to Almoravids)
 Mértola: 1033–91 (to Almoravids)
 Molina: ?–1100 (to Aragon)
 Morón: 1013–66 (to Seville)
 Murcia: 1011/12–65 (to Valencia)
 Murviedro and Sagunto: 1086–92 (to Almoravids)
 Niebla: 1023/24–91 (to Seville)
 Ronda: 1039/40–65 (to Seville)
 Rueda: 1118–30 (to Aragon)
 Saltés and Huelva: 1012/13–51/53 (to Seville)
 Santa María de Algarve: 1018–51 (to Seville)
 Seville: 1023–91 (to Almoravids)
 Silves: 1040–63 (to Seville)
 Toledo: 1010/31–85 (to Castile)
 Tortosa: 1039–60 (to Zaragoza); 1081/82–92 (to Denia)
 Valencia: 1010/11–94 (to El Cid, nominally vassal of Castile)
 Zaragoza: 1018–46 (to Banu Tujib; then to Banu Hud); 1046–1110 (to Almoravids; in 1118 to Aragon)

Second period (12th century) 
 Almería: 1145–47 (briefly to Castile and then to Almohads)
 Arcos: 1143 (to Almohads)
 Badajoz: 1145–50 (to Almohads)
 Beja and Évora: 1114–50 (to Almohads)
 Carmona: dates and destiny diffuse
 Constantina and Hornachuelos: dates and destiny diffuse
 Granada: 1145 (to Almohads?)
 Guadix and Baza: 1145–51 (to Murcia)
 Jaén: 1145–59 (Murcia); 1168 (to Almohads)
 Jerez: 1145 (to Almohads)
 Málaga: 1145–53 (to Almohads)
 Mértola: 1144–45 (to Badajoz)
 Murcia: 1145 (to Valencia); 1147–72 (to Almohads)
 Niebla: 1145–50? (to Almohads)
 Purchena: dates and destiny diffuse
 Ronda: 1145 (to Almoravids)
 Santarém: ?–1147 (to Portugal)
 Segura: 1147–? (destiny unknown)
 Silves: 1144–55 (to Almohads)
 Tavira: dates and destiny diffuse
 Tejada: 1145–50 (to Almohads)
 Valencia: 1145–72 (to Almohads)

Third period (13th century) 
 Arjona: 1232–44 (to Castile)
 Baeza: 1224–26 (to Castile)
 Denia: 1224–27 (to Almohads?)
 Lorca: 1240–65 (to Castile)
 Menorca: 1228–87 (to Aragon)
 Murcia: 1228–66 (to Castile)
 Niebla: 1234–62 (to Castile)
 Orihuela: 1239/40–49/50 (to Murcia or Castile)
 Valencia: 1228/29–38 (to Aragon)

Additionally, but not usually considered taifas, are:
 Granada: 1237-1492 (to Castile)
 Las Alpujarras: 1568–71 (to Spain)

Other websites 
 Chronology of the taifa kingdoms (in Spanish) 
 History of Spain: Disintegration of the Caliphate (1010–1260)

History of Islam
History of Portugal
History of Spain