With Islamic power steadily increasing in the later 10th century, the Christians suffered a corresponding decline. When ambassadors representing Ramiro III of León (966–984), Sancho II Garcés of Navarre (970–994), Count Borrell II of Barcelona (c. 940–992), and García Fernández, count of Castile (970–995), pledged homage and paid tribute to the caliph at Cordóba, the abject status of the Christian rulers was manifest for all to see. Yet, despite their acknowledgement of Islamic hegemony, the Leonese kings, adhering to Asturian custom, continued to assert their rights as heirs to the Visigothic tradition. Their claim to domination over the entire peninsula was now expressed in the idea of a Hispanic empire centred at León. As the century drew to a close, the imperial idea surely offered some comfort when Abū ʿĀmir al-Manṣūr (Almanzor), who exercised dictatorial authority in the caliph’s name, regularly ravaged all the Christian states. His semiannual plundering expeditions in the north not only brought many slaves to Cordóba but also helped to divert the Muslims from his usurpation of power. After defeating Count Borrell in 985, he burned Barcelona and three years later plundered León; in 997 he sacked the great Christian shrine of Santiago de Compostela. However, with the death of al-Manṣūr, the caliphate of Cordóba disintegrated.
The demise of Islamic rule allowed the Christian states to breathe easily again. The ensuing civil wars among the Muslims enabled Ramon Borrell, count of Barcelona (992–1018), to avenge past affronts by sacking Cordóba in 1010. Alfonso V of León (999–1028) exploited the situation to restore his kingdom and to enact the first general laws for his realm in a council held at León in 1017. Once the threat of Islam seemed to be removed, the Christian rulers resumed old quarrels. Sancho III Garcés (the Great), king of Navarre (1000–35), was able to establish an undisputed ascendancy in Christian Spain for some years. As communication with the lands of northern Christendom increased, French influence grew ever stronger. French pilgrims trod the newly developing route to Compostela; monastic life was reformed according to the Cluniac observance; and various northern social ideas and customs altered the life of the nobility. Already in control of the counties of Aragon, Sobrarbe, and Ribagorza, and including Count Berenguer Ramon I of Barcelona (1018–35) among his vassals, Sancho III continued his aggrandizement by overrunning the county of Castile and challenging Bermudo III of León (1028–37). Sancho completed his triumph by seizing the city of León and taking the title of emperor in 1034, but his death the next year brought an end to the unity he had achieved. The medieval empire, 1035–1157
By extending his rule over all the Christian states except Catalonia, Sancho III made an apparent advance toward the unification of Christian Spain. By choosing to treat his dominions as a private patrimony to be divided among his sons, however, he turned away from the Leonese tradition of a united, indivisible kingdom. He assigned the kingdom of Navarre to García III (1035–54); Castile to Ferdinand I (1035–65); and Aragon to Ramiro I (1035–63), who annexed Sobrarbe and Ribagorza in 1045 after the murder of a fourth brother, Gonzalo. As each of the brothers assumed the title king, Castile and Aragon thenceforward were regarded as kingdoms. Bermudo III recovered León after Sancho III’s death, but Ferdinand I defeated and killed him in 1037. Taking possession of the kingdom of León, he also assumed the imperial title. During the ensuing 30 years Ferdinand sought hegemony over all of Spain, triumphing over his brothers on the battlefield, capturing Coimbra, and reducing the Muslim rulers (reyes de taifas) of Toledo (Ṭulayṭulah), Sevilla (Ishbīliya), and Badajoz (Baṭalyaws) to tributary status.
Meanwhile, Count Ramon Berenguer I of Barcelona (1035–76) was actively fostering Catalan interests and relationships among the lords of Languedoc in southern France. He also published the earliest legal texts included in the compilation of Catalan law later known as the Usatges de Barcelona (“Usages of Barcelona”).
Adhering to his father’s practice, just before his death Ferdinand I divided his realms between his sons: Sancho II (1065–72) received Castile, and Alfonso VI (1065–1109) obtained León. However, the two brothers quarreled, and, following Sancho’s murder in 1072, Alfonso VI assumed the kingship of both Castile and León. Before acknowledging him as their monarch, the Castilian nobility forced Alfonso to swear that he had not caused his brother’s death. Among Alfonso’s new Castilian vassals was Rodrigo Díaz de Vivar, known to history as El Cid Campeador (from the Arabic sīdī, meaning “lord”). Driven into exile by jealousies at court, he entered the service of the Muslim king of Zaragoza and later provided protection for the king of Valencia.
At first Alfonso VI took advantage of the disunity among the kingdoms of Islamic Spain to demand tribute from them, but he eventually determined to subjugate them. The surrender of Toledo in 1085 not only extended his frontiers to the Tagus River but also had great symbolic value. Possession of Toledo, the ancient seat of the Visigothic monarchy, enhanced Alfonso’s claims to peninsular supremacy, which he expressed when he styled himself “Emperor of Toledo” as well as “Emperor of Spain.” According to Muslim sources, he described himself as “Emperor of the Two Religions,” thus underscoring his dominion over both Christians and Muslims. Thousands of Muslims and Jews, who in earlier times usually had retreated southward rather than submit to Christian rule, elected to remain within his kingdom. Also living in Toledo and the vicinity were many Mozarabs, or Arabic-speaking Christians. In succeeding generations the interaction among these differing religious and cultural traditions became especially tense.
Frightened by the fall of Toledo, the other Muslim kings of Spain appealed for help to the Almoravids of Morocco, an ascetic Islamic sect of Amazigh (Berber) zealots. After routing Alfonso’s army at Zalacca (Al-Zallāqah) in 1086, the Almoravids also overran Islamic Spain’s petty kingdoms. By restoring Islamic Spain’s unity, the Almoravids halted any further progress in the Reconquista and forced Alfonso to remain on the defensive thereafter. Although El Cid successfully repulsed the Almoravid attack on Valencia, his followers had to abandon the city after his death in 1099. Subsequently all of eastern Spain as far north as Zaragoza came under Almoravid domination.
As Christians and Muslims contended for control of the peninsula, steadily increasing northern European influences emphasized the links of Christian Spain with the wider world of Christendom. The leading proponent of the general reform of the church, Pope Gregory VII (1073–85), demanded liturgical uniformity by requiring the acceptance of the Roman liturgy in place of the native Mozarabic rite that dated to earliest times. He also claimed papal sovereignty over Spain, but, when the Spanish rulers ignored him, he did not pursue the issue. While French monks and clerics found opportunities for ecclesiastical advancement in Spain, numerous French knights came to take part in the wars of the Reconquista. The most fortunate among them, the cousins Raymond and Henry of Burgundy, married Alfonso VI’s daughters, Urraca and Teresa, and thereby became the ancestors of the dynasties that governed León and Portugal until the late 14th century.