In the seventh century, North Africa was overrun by the armies of the expanding Umayyad Caliphate.[“The Umayyads and the Abbasids”] In 640 the Arabs conquered Egypt and continued westward. The North African terrain was easy to move across since the population was sparse and there were few proper towns. Yet the people the Arabs ran into here were in many respects similar to themselves. A majority were Berbers, and many of them were nomads too, including the Tuaregs of the Saharan desert. Instead of putting up a fight, the nomads of the desert simply moved away from the path of the invaders, while the Berbers who lived along the Mediterranean coast gradually came to be assimilated into the new elite. To this day we tend to think of the people of North Africa as Arabs but many of them would prefer to be known as Berbers.At least some still regard the Arabs as invaders and dream of establishing an independent country.
The Berbers would soon reassert themselves. In the early eighth century, when the Arab armies continued their expansion into the Iberian peninsula, many Berbers went with them. Together they established a capital in Córdoba in the province they were to call al-Andalus. [“The Arabs in Spain“] Some groups of Berbers also went southward on a mission to convert pagans living in what today is Mauritania and Ghana. In general, the Berbers seem to have taken Islam very seriously. In the eleventh and twelfth centuries, two revivalist movements arose among them led by leaders who declared themselves disgusted by the lack of religious zeal among their fellow Muslims. The first of these movements, the Almoravids, was made up of Saharan tribes who left the desert and built a capital for themselves in the city of Marrakesh, on the northern side of the Atlas Mountains. They proceeded to create an empire which included all of today’s Morocco, but also vast areas of the deserts to the south and a broad strip of land along the Mediterranean coast. The Almoravids imposed sharia laws on the territories they occupied, banning the sale of alcohol and pork and, unusually for Muslim rulers, tried to convert the members of other religions by force.
Before long the Berbers had occupied Spain too. By the middle of the eleventh century, the political power of the Caliphate of Córdoba had disintegrated and a number of smaller Muslim kingdoms, known as the taifa, had made themselves independent of any central power.[“The Arabs in Spain”] The taifa kingdoms were often at war with each other and with the Christian kingdoms in the north of the peninsula. In 1086, as a way to restore peace and unity, the Almoravids were invited to al-Andalus by the taifa kings. This is how they came to expand their African empire into Europe. Much as in North Africa, the Almoravids were appalled by the low standard of morality among the local elites and before long they had imposed strict Islamic laws in Spain too. Yet the Almoravids were unable to maintain the purity of their faith. When the original leaders died, they were replaced by rulers who had far less interest in religious matters. With the help of architects imported from Muslim Spain, the Almoravids turned Marrakesh into a fortified city filled with sumptuous palaces and mosques.
This was when the second revivalist movement, the Almohads, began gathering in opposition to them. The Almohads were not from the desert but from the high Atlas Mountains of Morocco, yet they were if anything even more serious about their religion than the Almoravids originally had been. From their mountain stronghold, they undertook increasingly successful military campaigns and in 1147 they captured Marrakesh. In 1159, they had conquered all of North Africa and in 1172 all of al-Andalus. They made Sevilla into their second capital, although they regarded Spain as little more than an outpost of their empire. The Almohads too proceeded to impose strict Islamic laws on the people they had conquered. This had severe consequences for the cosmopolitan culture of cities like Córdoba. Many Christians fled northwards, and many Jews fled eastwards to Cairo.[“Mosheh ben Maimon”]
Yet the Almohads too mellowed with time, and they too became more interested in architectural projects than in imperial expansion. This was when the city of Fez was turned into a center of religious learning and scholarship. The medina of Fez — the market quarters of the city — was particularly famous. What sometimes is regarded as the oldest university in the world, the University of Al Quaraouiyine was founded by a woman, Fatima al-Fihri, in Fez in 859. In addition, the Almohads turned the city of Rabat, on the Atlantic coast, into a major port and a fortified naval base. Yet their empire began crumbling already in the first part of the thirteenth century. In 1212, only forty years after the initial occupation, they in Spain were defeated by an alliance of Christian rulers, and by 1269 it was all over for the Almohads.