Spain
Muslim era and Reconquista

From 711 to 718, as part of the expansion of the Umayyad Caliphate which had conquered North Africa from the Byzantine Empire, nearly all of the Iberian Peninsula was conquered by Muslims from across the Strait of Gibraltar, resulting in the collapse of the Visigothic Kingdom. Only a small area in the mountainous north of the peninsula stood out of the territory seized during the initial invasion. The Kingdom of Asturias-León consolidated upon this territory. Other Christian kingdoms, such as Navarre and Aragon in the mountainous north, eventually surged upon the consolidation of counties of the Carolingian Marca Hispanica. For several centuries, the fluctuating frontier between the Muslim and Christian-controlled areas of the peninsula was along the Ebro and Douro valleys.

Conversion to Islam proceeded at an increasing pace. The muladíes (Muslims of ethnic Iberian origin) are believed to have formed the majority of the population of Al-Andalus by the end of the 10th century.

A series of Viking incursions raided the coasts of the Iberian Peninsula in the 9th and 10th centuries. The first recorded Viking raid on Iberia took place in 844; it ended in failure with many Vikings killed by the Galicians' ballistas; and seventy of the Vikings' longships captured on the beach and burned by the troops of King Ramiro I of Asturias.

In the 11th century, the Caliphate of Córdoba collapsed, fracturing into a series of petty kingdoms (Taifas), often subject to the payment of a form of protection money (Parias) to the Northern Christian kingdoms, which otherwise undertook a southward territorial expansion. The capture of the strategic city of Toledo in 1085 marked a significant shift in the balance of power in favour of the Christian kingdoms. The arrival from North Africa of the Islamic ruling sects of the Almoravids and the Almohads achieved temporary unity upon the Muslim-ruled territory, with a stricter, less tolerant application of Islam, and partially reversed some Christian territorial gains.

The Kingdom of León was the strongest Christian kingdom for centuries. In 1188, the first form (restricted to the bishops, the magnates, and 'the elected citizens of each city') of modern parliamentary session in Europe was held in León (Cortes of León). The Kingdom of Castile, formed from Leonese territory, was its successor as strongest kingdom. The kings and the nobility fought for power and influence in this period. The example of the Roman emperors influenced the political objective of the Crown, while the nobles benefited from feudalism.

Muslim strongholds in the Guadalquivir Valley such as Córdoba (1236) and Seville (1248) fell to Castile in the 13th century. The County of Barcelona and the Kingdom of Aragon entered in a dynastic union and gained territory and power in the Mediterranean. In 1229 Majorca was conquered, so was Valencia in 1238. In the 13th and 14th centuries, the North-African Marinids established some enclaves around the Strait of Gibraltar. Upon the conclusion of the Granada War, the Nasrid Sultanate of Granada (the remaining Muslim-ruled polity in the Iberian Peninsula after 1246) capitulated in 1492 to the military strength of the Catholic Monarchs, and it was integrated from then on in the Crown of Castile.
combination:repeat_prompt, change_case:english_lowercase