The northern Christian states, Asturias and then León, Castile, Navarre, Aragon and the counties of Catalonia, grew as al-Andalus weakened. The taifa kings paid tribute to Christian rulers, and in 1085 Alfonso VI (king of León and Castile) of Castile took Toledo, the old Visigothic capital. The taifas called in the Almoravids, Berber rulers from Morocco, who defeated Alfonso VI in 1086 and took over al-Andalus.
Rodrigo Díaz de Vivar (Castilian warrior, El Cid), El Cid, fought for both Christian and Muslim rulers before taking Valencia for himself in 1094. Later the Almohads, another Berber dynasty, replaced the Almoravids. In 1212 the kings of Castile, Aragon and Navarre won a great victory over the Almohads at Las Navas de Tolosa.
Castile, united for good with León in 1230 under Ferdinand III (king who took Córdoba and Seville), took Córdoba in 1236 and Seville in 1248, while James I of Aragon (conqueror of Majorca and Valencia) conquered Majorca and Valencia. Only the emirate of Granada was left, ruled by the Nasrids, who paid tribute to Castile and built the Alhambra. In Toledo, scholars translated Arabic works, and Greek works preserved in Arabic, into Latin and Castilian.

Portugal became a kingdom of its own in the 12th century, and the Crown of Aragon built a Mediterranean empire that reached Sicily, Sardinia and Naples. Castile suffered the Black Death from 1348 and a civil war in which Henry of Trastámara (founder of the Trastámara dynasty) killed his half-brother, King Peter (king killed by his half-brother), in 1369, founding the Trastámara dynasty. In 1469 Isabella (queen of Castile), heir to Castile, secretly married Ferdinand (king of Aragon), heir to Aragon.