Although the Umayyads were decisively defeated by the Abbasids in 750, they obtained a surprising lease on life — in the Iberian peninsula, on the western-most frontier of the Arabic world. As the caliphate in Damascus was about to fall, a branch of the Umayyad family fled across North Africa and established itself in the city of Córdoba, in present-day Spain, or in what the Arabs referred to as “al-Andalus.” The Arabic incursion into Spain had started already in 711, with a small party of raiders, predominantly Berbers, making their way from Morocco to Gibraltar — or Jabal Ṭariq as they called it, “the mountain of Tariq,” named after their commander. In the end, all of present-day Spain and Portugal were occupied, except for a few provinces close to the Pyrenees in the north. In 756, the Umayyads established a new caliphate for themselves at Córdoba. They were greeted as saviors by the Jewish community who had suffered from persecution under the Visigoths, the previous rulers, and by many ordinary people too who had suffered under heavy taxation.
The Caliphate of Córdoba, 929-1031, was the high point of Arabic rule in Spain. This was, first of all, a period of great economic prosperity. The Arabs connected Europe with trade routes going to North Africa, the Middle East and beyond, and industries such as textiles, ceramics, glassware, and metalwork were developed. Agriculture was thriving too. The Arabs introduced crops such as rice, watermelons, bananas, eggplant, and wheat, and the fields were irrigated according to new methods, which included the use of the waterwheel. Córdoba was a cosmopolitan city with a large multi-ethnic population of Spaniards, Arabs, Berbers, Christians and a flourishing community of Jews. In Córdoba, much as in the rest of the Arab world, the dhimmi was allowed to rule themselves as long as they stayed obedient to the rulers and paid their taxes. The caliphs were patrons of the arts and fashion and their courtiers took up civilized habits such as the use of deodorants and toothpaste. But Córdoba was an intellectual center too. The great mosque, completed in 987 and modeled on the Great Mosque of Damascus, was not only a place of religious worship but also an educational institution with a library which contained some 400,000 books. The scholars who gathered here did cutting-edge research in the medical sciences, including surgery and pharmaceutics. They reacted quickly to intellectual developments that were coming out of Baghdad and from other places in the Arab world.
Yet this caliphate too proved difficult to keep together. In the first part of the eleventh century, it fell apart as rivalries, a coup and a full-fledged civil war — the Fitna of al-Andalus — pitted various factions against each other. In 1031, the caliphate disintegrated completely and political power in the Iberian peninsula was transferred to the taifa — the small, thirty-plus kingdoms which all called themselves “emirates” and all to varying degrees were in conflict with one another. This was when the Christian kingdoms in the north of the peninsula began to make military gains. Christian forces captured Toledo in 1085, and the city soon established itself as the cultural and intellectual center of Christian Spain. This is not to say that the various Christian kingdoms had a common goal and a common strategy. Rather, each Christian state, much as each Muslim, was looking after its own interests and making wars with other kingdoms quite irrespective of religious affiliations. Thus, some emirs were allied with Christian kings, while kings paid tribute to emirs and they all employed knights who killed on behalf of whoever paid the highest salary. Quite apart from the military insecurity of the taifa period, this competition had positive side effects. The taifa kings sponsored both sciences and the arts. This is how small provincial hubs such as Zaragoza, Sevilla, and Granada came to establish themselves as cultural centers in their own right.
Enter the Almoravids. The Almoravids were a Berber tribe, originally nomads from the deserts of North Africa, who had established themselves as rulers of Morocco, with Marrakesh as their capital. After the fall of Toledo, they invaded al-Andalus and already a year later, in 1086, they had successfully occupied the southern half of the Iberian peninsula. However, they never managed to take back Toledo. In 1147, at the height of their power, the Almoravids were toppled and their leader killed by a rivaling coalition of Berber tribes known as the Almohads. The Almohads were a religious movement as well as a military force, and their rule followed strict Islamic principles: they banned the sale of pork and wine and the mixing of men and women in public places. They burned books too — including Islamic tracts with which they disagreed — and insisted that Christians and Jews convert to Islam on the pain of death. By 1172, the Almohads had conquered all of al-Andalus. Under these circumstances, many of the inhabitants preferred to flee — Christians to the north, while Jews fled east to Cairo and the Fatimid Caliphate, where the rulers were far more accepting of members of other religions.
Yet Almohad rule in al-Andalus did not last long. In 1212, at the Battle of Las Navas de Tolosa, the Christian princes managed, for the first time, to put up a united front against them. Córdoba fell to the Christian invaders in 1236 and Sevilla in 1248. From this time onward it was only Granada, together with associated smaller cities such Málaga, that remained in Muslim hands. Here, however, the multicultural and dynamic spirit of al-Andalus continued to thrive for another 250 years. Wisely, after Navas de Tolosa, Granada allied itself with the Christian state of Castile. Although this friendship occasionally broke down, the Emirate of Granada, as it came to be known, continued to pay tribute to Castile in the form of gold from as far away as Mali in Africa. Today the most visible remnant of the Emirate of Granada is the Alhambra, the fortress and palace which served as the residence of the emir. It is famous above all for its courtyards, its fountains and its roses. Yet in 1492, Granada too fell to the Christians and the last Emir of al-Andalus — Muhammad XII, known as “Boabdil” to the Spaniards — was forced out of Spain. The Christians, much as the Almohads before them, were on a mission from God, and they ruled the territories they had conquered in a similarly repressive fashion. The Alhambra Decree, issued three months after the fall of Granada, forced the non-Christian population to convert or leave. As a result, some 200,000 Muslims left for North Africa, while an equal number of Jews preferred to settle in the Ottoman Empire to the east. This was the end of Muslim rule and the end of the cultural and intellectual flourishing of southern Spain.