With the sacking of Compostela in 997 AD, the Moorish leader Al-Mansur almost ended the Re-conquest before it had properly begun. The Muslim caliphate of Al-Andalus covered two-thirds of the country, and Al-Mansur's strike deep into Christian territory was nearly a mortal blow. If even Compostela was not safe, there was surely nowhere the Moors could not reach.
This was to become one of history's 'nearly' moments. It is interesting to speculate on what might have happened had the Moors pushed on. They showed little inclination to set up permanent settlements beyond great natural boundaries such as the rivers Ebro and Douro and the high plains of the northern meseta.
When Al-Mansur died in 1002, the Moors were left without a strong leader. Caliph Hisham II was an effeminate type who frequently wore veils and make-up, and he named Al-Mansur's son, Sanchuelo, as his successor. Sanchuelo was a hard-drinking womaniser, and his reign was punctuated by regular revolts. Had Al-Mansur survived, or if there had been a leader of his power and influence in Moorish Spain in the early years of the 11th century, the Christians could have been driven out of Iberia altogether.
Instead, constant revolts shattered the caliphate. After decades of weak leadership, the caliph lost control and in 1031 his lands were divided into 20 taifas ('party kingdoms') along racial and geographical lines. The taifas bickered among themselves, and even allied with Christian armies to help resolve their unseemly squabbles. The powerful Muslim lands, though still dominating the political map, were now ruled by weak, decadent rulers.
This would have been a key time for a Christian revolution, but they were in a very similar position. Christian settlers refused to go to newly conquered hinterlands, fearing the Muslim hordes. Additionally, the Christian lands were fragmented. Decades of work would go into expanding a small territory by conquest and marriage; then the king would die and decree that his power base be divided equally among his sons. Consolidating power seemed hopeless.
So for many years, Spain meandered along as it always had. The Moors would occasionally cross the long strip of no-man's-land for a spot of pillaging, burning and beheading. Occasionally a Christian kingdom with pretensions of power might form and fight back, but neither the pillaging or the kingdom could last.
The Spirit Develops
Eventually, moral outrage and religious fervour began to galvanise the Christians. They began to consolidate their power bases, offering charters known as fueros to new frontier towns and powerful allies. This system meant the king could ensure fealty from a lord or get a new town built by offering land, tax breaks or special privileges. Political representation would blossom in the coming years. Local cortes (parliaments) were be set up over 100 years before anything comparable appeared in England.
The Christian states now had a cause and were developing longer lasting allegiances. In turn, kingdoms grew larger and more powerful. First, Navarra, then Castile, began to take land from the Moors. Next, the count of Barcelona, Ramon Berenguer I, created the new and independent state of Catalonia and developed Europe's first set of feudal laws. The power vacuum was being filled. La Reconquista had begun.
In 1039, Fernando I of Castile swept across the peninsula, conquering land as far apart as Valencia and Castile. Unfortunately, he too split his land on his death in 1065, his three sons sharing the spoils. Sancho1, known as 'the Strong', inherited Castile; Alfonso ('the Brave') took León; and García, of no sobriquet, got Galicia.
The brothers' relationship was a tad strained. A civil war broke out almost immediately afterward between Sancho and Alfonso. García took advantage of the chaos and declared himself the first king of Portugal, after which Sancho and Alfonso made their peace to attack and take Galicia. After dividing it, they fell out again and went to war; Sancho came out on top and exiled both his brothers. Not content with a triple kingdom, Sancho then went and attacked his sister, Elvira, and captured her city, Toro. He then tried to take the city of Zamora from his other sister, Urraca, before being assassinated by one of her nobles. All this breathless action happened in less than seven years of Alfonso's death.
Meanwhile, a legend was in the making.
An old prophecy stated that a Rodrigo (Roderick) had lost Spain, and a Rodrigo would win it back. If there was ever a Rodrigo who could do it, it was a warrior named Rodrigo Díaz de Vivar. History and folklore remember him by a simpler name: El Cid Campeador.
El Cid was a majestic, swashbuckling hero who won many battles for Sancho. When Sancho was assassinated, he switched his loyalty to Alfonso, but only after he made Alfonso swear an oath that he had no part in it, with the words "if you are lying, please God that a traitor and a vassal kills you". Honour satisfied, Alfonso stepped into the vacuum to take control of the reunited kingdoms of Castile and Léon. El Cid briefly went into exile.
He popped up on a regular basis in a kind of freelance role, fighting for the Moors at Zaragoza and against them everywhere else; always winning. El Cid became a nightmare for the Muslims, carving himself a kingdom from their land near Valencia. Ultimately, he died suddenly in 1099 before fulfilling his 'destiny', but even then he still won another battle. According to legend, his corpse, dressed in armour and lashed to his horse, led Christian troops out to a battlefield, causing panic in the Muslim camp. Ultimately, Valencia surrendered to the Moors three years after his death. The truth tends to be less palatable than the myth. El Cid's story is told in a great epic poem, one of the most famous in Spanish literature, called El Cantar del Mio Cid:
I win battles as it pleases the Creator,
Moors and Christians have great fear of me,
there down in Morocco, where the mosques are,
that they will have an attack by me perhaps some night
they fear it, but I don't plan to,
I won't go after them, in Valencia I'll stay,
they will pay me tribute with the help of the Creator,
let them pay me or whomever I please.
Take to your horses, men of Andacucía! To remain is pure folly. Garments begin to unravel by fraying at the edges, but our kingdom has been ripped down the centre.
A Moorish poet reacted to Alfonso's capturing the old Visigothic capital at Toledo in 1085. It was a significant victory, and followed Alfonso's forays deep into Andalucía, where he even rode his horse into the Mediterranean. The Moors of Sevilla responded by issuing a plea for help to the rulers of Morocco, the Almoravids. This tough, war-like tribe took on Alfonso's army near Badajoz and routed them, Alfonso himself barely escaping. Now there was a real war on. Both sides had powerful armies, and the Almoravid's fundamentalist beliefs meant an ideological battle had also begun. In 1095 it became official: the pope authorised a crusade against the Moors.
At first, the Christians panicked in the face of the Almoravid threat. But, as their numbers were swelled by persecuted Christians and Jews from the south, they soon realised the need to join together to fight more effectively. Alfonso of Aragon re-took Zaragoza and made it his capital. The marriage of his niece to the Count of Catalonia created a powerful new kingdom, well placed for Mediterranean trade and influence. By 1150, the country was divided neatly in half, with the Moors controlling everything south of a line from Lisbon to the Erbo estuary. To the north, Portugal had been founded in 1139; Navarra held the far north-east; Aragon the far east; and Castile the rest. Castile was by far the largest and most powerful, and became the focus of the Re-conquest.
Religious fervour spread among the Christians. The Camino de Santiago became Europe's most important pilgrimage, and the Holy Grail - supposedly brought to Spain in the 4th century - resurfaced in the hands of the Aragonese monarchy. But it was not always just for the glory of God; the knights of St James dedicated themselves to 'God and the ladies'. Particularly heroic knights were given huge tracts of land in conquered areas.
The Christians made stunning gains, but it would not be the end of the Almoravids. A sect of intolerant and fanatical Muslims from the Atlas mountains rose up in Morocco and invaded Andalucía - the Almohades had arrived. They razed all churches and synagogues, then went on the counter-offensive, destroying a Christian army at Alarcos in 1195. A generation of knights fell. The Moors went back to Sevilla to consolidate their power; the Christians back to their kingdoms to lick their wounds.
1212 and All That
Over the next decade, the Moors appeared to be in the ascendancy. They won most of the skirmishes, and for a while their sights seemed set on re-capturing Toledo. The Christians, however, had learned from the defeat at Alarcos. The kingdoms of Aragon, Portugal and Navarra sent their armies to join the Castillans, and the pope announced a new crusade against the Moors. Soldiers from all over Europe, most notably France, arrived to fight alongside the Castillans.
In June, 1212 - a date as unforgettable to the Spanish as 1066 is to the English - a huge army made its way south from Toledo. It passed through the Sierra Moreno, guided by a mysterious shepherd, and attacked the Almohades army on the rolling plains of Las Navas de Tolosa on 16 July. The Almohades were utterly annihilated, losing almost their entire army, while the Christians lost only about 2,0002. The Moors' commander promptly drank himself to death, and hundred of thousands of them fled to north Africa.
Forty years later, the Reconquista was almost complete. The Christians slowly mopped up the remaining Muslim resistance in Andalucía, but there was still time for one anomaly to be created. Mohammed I ibn Nasr, the ruler of Granada, saw the end coming and in 1238 offered King Fernando III of Castile a deal. In exchange for assistance in defeating the Muslim kingdom of Sevilla and an annual tribute, Fernando agreed to guarantee Granada's safety. Sevilla fell, and ibn Nasr returned to Granada. He famously greeted the Moorish chants of 'Victory!' with a bitter utterance: "There is no victor but Allah", a phrase that would later be inscribed thousands of times in the stonework of the Alhambra palace.
The Nazrid dynasty would rule the tiny kingdom of Granada for 244 more years, a lone Muslim presence in a Christian land. With four distinct kingdoms, however, Spain was still far from united.