The Iberian Peninsula saw the rise of numerous more or less independent Taifa Kingdoms after the collapse of the Caliphate of Cordoba in 1031. The period of Taifa Kingdoms also known as “the period of regional kings” strengthened the position of the Christian Kingdoms of the Iberian Peninsula which started their expansion on the expense of Muslim lands. Taifa states were unable to defend themselves against the Christian Kingdoms on the north and the west, and were forced to seek help at the Almoravids, a Berber confederation that succeeded the Fatimid dynasty in Northern Africa.
The Almoravids under Yusuf ibn Tashfin defeated the Christian forces led by Alfonso VI of Castile in 1086. However, Almoravids afterwards subdued the Taifa Kingdoms and ruled the Muslim Spain until 1174 when they were overthrown by the Almohads, another Berber dynasty. The Almohads were defeated by a coalition of Christian kings under leadership of Alfonso VIII of Castile in the Battle of Las Navas de Tolosa in 1212 which was a major turning point in the history of Reconquista.