Before the First Crusade to the Holy Land, the idea of religious war was tried out in Spain.
The Christian kingdoms in the north were, from west to east (left to right): Galicia with two Atlantic borders; Castile and Leon, lined up along the northern Atlantic coast; Navarre and Aragon, along the foothills of the Pyrenees (Aragon was landlocked). Their ruling families were so frequently engaged in fraternal wars that they really needed no outside enemies. Marriages and deaths were constantly uniting and dividing portions of the kingdoms; it’s hard to find a year when no Christian kings were at war with each other.
In 1064, only Aragon was ruled independently; its king, Sancho, accepted the Pope’s offer to send an international contingent of knights to help take back a city on Aragon’s border. The Duke of Aquitaine and some of the Normans who had been invading Italy joined him to besiege and conquer Barbastro. It appears that city was truly sacked in a way that local Muslim and Christian armies did not normally do. Instead of backing off and organizing tribute, the Norman and French knights set about executing, raping, enslaving and burning. Only a year later, the Muslims had recaptured the town; but the siege of Barbastro seems to have been a psychological turning point.
Historians now dispute just how directly the Pope offered his assisance in this first proto-Crusade, but there’s no doubt that the next Pope proclaimed automatic forgiveness of sin to any knights who went to Spain. Pope Gregory VII (who was often at war with the King of Germany) clearly saw the danger of relying too much on the Franks, whether French or German. He was trying to strengthen new ties to support Rome. The Kings of Aragon and Leon vied for who could promise the Pope better support and more loyalty to his reforms. If either of them emerged as a strong Rome supporter, the Pope would be safer.
King Alfonso of Leon-Castile led the next major invasion (apparently without international guests) against the Muslims. The taifa of Toledo was already paying him tribute, and it was not actually hostile to him personally, since he had lived there for a short time to be safe from a losing battle against his brother, the King of Navarre. But after he had consolidated power, he occupied Toledo in 1085 and made it his new capital city, as it had once been the capital of the Visigoths. He quickly appointed one of the Pope’s close associates (a Frenchman, not a Castilian) as Archbishop of Toledo and decreed that churches there must follow the current rites of Rome, not their traditional ones.
The loss of Toledo was a huge blow to the allied Muslim taifas. The emirs of Seville, Toledo, Valencia and Granada faced a problem: would Spain have another international invasion? The emirs could be friendly with Spanish kings; the Emir of Zaragoza apparently stalled one crusade attempt in 1073 by allying with the King of Navarre against the King of Aragon. Nor were these emirs recent immigrants; by 1050 they shared more culture with any other Spanish city than with far-off Muslim places like Egypt. But the nature of territorial war in Spain seemed to be changing. The emirs couldn’t afford to allow Spain to become a bloody international battleground while they used only local forces. They would have to call on international Muslims.
It was a bitter decision because the closest Muslims were Berbers, and importing Berbers had always been a huge mistake. The emirs were aware that mercenaries might take over; but the Emir of Seville is supposed to have said, “it’s better to drive camels in Africa than to herd pigs in Seville.” If he was going to lose power, he would rather be overthrown by Muslims than by savage Normans.
They sent a request to Marrakech, the capital of the Almoravid dynasty. The Almoravids arrived quickly, wearing Tuareg blue veils as a uniform. In 1086, the emirs of several cities and the Almoravids met Alfonso’s army at Badajoz, on the border of modern Portugal. The Arabs later nicknamed the field of battle “al-Zalaka” which means “slippery,” because the ground became so bloody. Alfonso survived but with immense losses; he withdrew to Toledo and did not invade Muslim territory again.
Meanwhile, the Almoravids began overthrowing the same emirs who had invited them. The emirs had become too complacent about religion, too willing to ally with Christians, and too much like city-dwellers who loved luxury, safety, and high taxes. The Emir of Seville was taken captive by Berbers in 1091, the same year that Turks came very close to the gates of Constantinople. He died imprisoned in Morocco in 1095, the same year that the Pope called for the First Crusade to help Constantinople.
In one of the curious twists of history, the Muslim daughter-in-law of the Emir of Seville ended up taking refuge with King Alfonso in Toledo, and she probably became his 3rd wife. Alfonso maintained Toledo’s scholarly library and began a program of translating its works into Castilian (his spoken language) and Latin. He continued to strike Arabic-letter coins. At this point, the Mozarab culture could hardly distinguish between native ideas/images and Arabic ones.