In the latter half of the 11th century the warring Islamic states of Iberia (the taifas) became increasingly reliant on the Almoravids of North Africa, a Berber dynasty with a strong military tradition and strict adherence to Islam, to resist the advance of the Christian kingdoms from the north. In the 1090s the Almoravid ruler Abudllah ibn Yasin overthrew the ineffective taifa rulers and added al-Andalus to the Almoravid realm, halting the Christian reconquista (reconquest). In the mid-12th century the Almoravids were taken over by another Berber dynasty, the Almohads, who originated in the Atlas Mountains and gradually spread throughout Morocco and then crossed over to Iberia. Their Iberian empire eventually stretched as far north as the Ebro River, and Seville became a great centre of learning and religious architecture. By then the Christian territories were coalescing into independent and powerful kingdoms, and the Almohads remained confined to their own dominion. Galicia in the northwest alternated between independence and union with Léon, founded by the Asturians in 912 CE. Over the course of the 11th and 12th centuries Léon would unite with Castile to become Castile-Léon, which was destined to become the cultural and political heartland of the later kingdom of Spain. Aragon, previously a vassal of the Basque kingdom of Pamplona (later Navarre), expanded and flourished through its conquest of Muslim territories, eventually ruling Catalonia and the County of Barcelona. Portugal, previously a county allied with Léon, is traditionally believed to have been transformed into a kingdom after a famous victory over the Muslims in 1139. By 1143 the independence of King Afonso Henriques was accepted by his cousin and feudal overlord the King of Léon.
— OR —