The Spread of Islam
Occupations in the 5th and 6th centuries by the Vandals,Visigoths, and the Byzantine empire were all short lived and left a divided Morocco, known as the Al Maghreb Aqsa ("The Farthest West") ripe for Arab invasions during the late 7th and early 8thcenturies. During the next six centuries, Morocco withered under a series of invasions by rival Islamic sects and dynasties, both from the East and South. Islamic influence began in Morocco in the seventh century A.D. Arab conquerors converted the indigenous Berber population to Islam, but Berber tribes retained their customary laws. The Arabs abhorred the Berbers as barbarians, while the Berbers often saw the Arabs as only an arrogant and brutal soldiery bent on collecting taxes. Once established as Muslims, the Berbers shaped Islam in their own image and embraced schismatic Muslim sects, which, in many cases, were simply folk religion barely disguised as Islam, as their way of breaking from Arab control.
The Saracens of Northern Africa played a by no means inconspicuous role among the civilised peoples of the Middle Ages. Separated from Egypt by sandy deserts, the Arabian provinces with the which corresponded to the old Vandal kingdom of Africa, and of necessarily took up, even before repudiating allegiance to Cordova and with the the Caliph of Bagdad, a position of practical independence. Divided under the Aglabites and Edrisites but reunited the under the Almohades, they were in whole or part at times (907 — 1171) variously connected with the Abbasside Caliphs, with the Caliphs of Cordova and with the rival Caliphates of Fez (803-949) and the Fatimites (907-1171). Repeatedly recruited from the virile force of the borderland deserts, they sent forth successive bands of conquerors to Sicily and Southern Italy, to Egypt and to Spain.
The narrow strip of habitable land between the great African desert and the Mediterranean Sea was always the nursery of schismatics. The superstitious and credulous Berbers offered a favorable soil for the germination of all varieties of Mohammadan heresy. Any prophet who found himself without honor in his own country had only to go to the Berbers of North Africa to be sure of a welcome and an enthusiastic following; whilst the distance from the center of the Caliphate and the natural turbulence and warlike character of the population predisposed the 'Abbaskis to ignore the disloyalty of provinces which profited them little and cost them ceaseless energy and expense to control. Hence the success of such strange developments of Islam as the Almoravides and Almohades, the establishment of 'Alid dynasties such as the Idrasids and Fatimids. North Africa had been subdued by the Arabs with difficulty between the years 647 (26) and 700, and had since been ruled with varying success by the lieutenants of the Caliphs. North Africa became a prey to anarchy, which was only suppressed by allowing the local dynasties, which then sprang up, to exercise independent authority. After the year 800 the 'Abbasid Caliphs had no influence whatever west of the frontier of Egypt.
The eleventh and twelfth centuries witnessed the founding of several great Berber dynasties led by religious reformers and each based on a tribal confederation that dominated the Maghrib (also seen as Maghreb; refers to North Africa west of Egypt) and Spain for more than 200 years. The Berber dynasties (Almoravids, Almohads, and Merinids) gave the Berber people some measure of collective identity and political unity under a native regime for the first time in their history, and they created the idea of an “imperial Maghrib” under Berber aegis that survived in some form from dynasty to dynasty. But ultimately each of the Berber dynasties proved to be a political failure because none managed to create an integrated society out of a social landscape dominated by tribes that prized their autonomy and individual identity.
After the final fall of Andalusia (the last Arab entity remaining in Spain from the Cordova caliphate) in 1492, Morocco fought off continuous invasions from Portugal, Spain, and England through the 17th century. In 1559 the region fell to successive Arab tribes claiming descent from the Prophet Muhammad: first the Saads, who ruled for about 100 years, and then the Alawis, who founded a dynasty that has remained in power since the seventeenth century. Despite the weakness of its authority, the Alawite dynasty distinguished itself in the eighteenth and nineteenth centuries by maintaining Morocco’s independence while other states in the region succumbed to Turkish, French, or British domination. However, in the latter part of the nineteenth century Morocco’s weakness and instability invited European intervention to protect threatened investments and to demand economic concessions. The first years of the twentieth century witnessed a rush of diplomatic maneuvering through which the European powers and France in particular furthered their interests in North Africa. Disputes over Moroccan sovereignty were links in the chain of events that led to the Great War.