The history of human habitation in Morocco extends back to the Lower Paleolithic, with some of the earliest known evidence found at Jebel Irhoud. Much later, Morocco formed part of the Iberomaurusian cultural sphere, represented by sites such as Taforalt. The region later saw the establishment of Mauretania and other ancient Berber kingdoms, followed by the foundation of the Moroccan state under the Idrisid dynasty and the rise of successive Islamic dynasties, culminating in the establishment of the Alawi dynasty, which has ruled Morocco since the 17th century and remains the country's reigning dynasty today."The CBS News Almanac", Hammond Almanac Inc., 1976, p.783: "The Alaouite dynasty (Filali) has ruled Morocco since the 17th century"
Archaeological evidence has shown that the area was inhabited by hominids at least 400,000 years ago. The recorded history of Morocco begins with the Phoenician colonization of the Moroccan coast between the 8th and 6th centuries BCE, although the area was inhabited by indigenous Berbers for some two thousand years before that. In the 5th century BCE, the city-state of Carthage extended its hegemony over the coastal areas.Pennell 2003, pp.7–9 They remained there until the late 3rd century BCE,Pennell 2003, pp.9–11 while the hinterland was ruled by indigenous monarchs. Indigenous Berber monarchs ruled the territory from the 3rd century BCE until 40 CE, when it was annexed to the Roman Empire. In the mid-5th century CE, it was overrun by Vandals, before being recovered by the Byzantine Empire in the 6th century.
The region was conquered by the Muslims in the early 8th century CE but broke away from the Umayyad Caliphate following the Berber Revolt of 740. Half a century later, the Moroccan state was established by the Idrisid dynasty."tradition (...) reaches back to the origins of the modern Moroccan state in the ninth century Idrisid dynasty which founded the venerable city of. Fes", G Joffe, Morocco: Monarchy, legitimacy and succession, in : Third World Quarterly, 1988 The Idrisids were succeeded by the Almoravid dynasty, the Almohad dynasty, the Marinid dynasty and the Wattasid dynasty. The Saadi dynasty then ruled Morocco from the 16th to the 17th century, followed by the Alawi dynasty from 1667 onward.Joseph L. Derdzinski, "Internal Security Services in Liberalizing States: Transitions, Turmoil, and (In)Security", Ashgate Publishing Ltd., 2013 (). p.47: "Hassan in 1961, after the death of his father Mohammed V , continued the succession of Alaouite rule in Morocco since the seventeenth century"Hans Groth & Alfonso Sousa-Poza, "Population Dynamics in Muslim Countries: Assembling the Jigsaw", Springer, 2012 (). p.229: "The Alaouite dynasty has ruled Morocco since the days of Mulai ar-Rashid (1664–1672)"
Prehistoric Morocco
Archaeological excavations have demonstrated the presence in Morocco of people ancestral to Homo sapiens, as well as earlier human species. The fossilized remains of an early human ancestor, dated to around 400,000 years ago, were discovered in Salé in 1971.
Remains of early Homo sapiens were excavated at Jebel Irhoud in 1991. In 2017, the remains were dated using modern techniques to at least 300,000 years ago, making them the oldest known examples of Homo sapiens discovered.
In 2007, small perforated seashell beads dating to approximately 82,000 years ago were discovered at Taforalt. The finds represent some of the earliest known evidence of personal adornment.
During the Mesolithic period (c. 20,000–5000 years ago), the geography of Morocco resembled a savanna rather than the present arid landscape.1984 D. Lubell. Paleoenvironments and Epi-Paleolithic economies in the Maghreb (ca. 20,000 to 5000 B.P.). In J.D. Clark & S.A. Brandt (eds.), From Hunters to Farmers: The Causes and Consequences of Food Production in Africa. Berkeley: University of California Press, pp. 41–56. Although little is known about settlements in Morocco during this period, excavations elsewhere in the Maghreb suggest an abundance of game and forests suitable for Mesolithic hunter-gatherer societies, including those associated with the Capsian culture.D. Lubell, Environmentalism and Epipalaeolithic economies in the Maghreb (c. 20,000 to 5000 B.P.), in J.D. Clark & S.A. Brandt (eds.), From Hunters to Farmers: Causes and Consequences of Food Production in Africa, Berkeley: University of California Press, pp. 41–56.
During the Neolithic period, which followed the Mesolithic, the savanna was inhabited by hunters and herders. The culture of these Neolithic communities flourished until the region began to desiccate after 5000 BCE due to climatic changes. The coastal regions of present-day Morocco during the early Neolithic shared in the Cardium pottery culture common across the Mediterranean region. Archaeological evidence suggests that the domestication of cattle and the cultivation of crops occurred in the region during this period.
During the Chalcolithic period (Copper Age), the Beaker culture reached the northern coast of Morocco.
Early history Carthage (c. 800 – c. 300 BCE)
The arrival of Phoenicians on the Moroccan coast heralded many centuries of rule by foreign powers in the north of Morocco. Phoenician traders penetrated the western Mediterranean before the 8th century BCE, and soon after set up depots for salt and ore along the coast and up the rivers of the territory of present-day Morocco.Pennell 2003, p.5 Major early settlements of the Phoenicians included those at Chellah, Lixus and Mogador. Mogador is known to have been a Phoenician colony by the early 6th century BCE.Sabatino Moscati, The Phoenicians, Tauris,
By the 5th century BCE, the state of Carthage had extended its hegemony across much of North Africa. Carthage developed commercial relations with the Berber tribes of the interior, and paid them an annual tribute to ensure their cooperation in the exploitation of raw materials.
Mauretania (c. 300 BCE – c. 430 CE)
Mauretania was an independent tribal Berber kingdom on the Mediterranean coast of north Africa, corresponding to northern modern-day Morocco from about the 3rd century BCE.C. Michael Hogan, Chellah, The Megalithic Portal, ed. Andy Burnham The earliest known king of Mauretania was Baga who lived around 225 BCE and possibly belonged to an older dynasty. Some of its earliest recorded history relates to Phoenician and Carthaginian settlements such as Lixus and Chellah. The Berber kings ruled inland territories overshadowing the coastal outposts of Carthage and Rome, often as satellites, allowing Roman rule to exist. It became a client of the Roman empire in 33 BCE, then a full province after Emperor Caligula had the last king, Ptolemy of Mauretania, executed (39 CE or 40).
Rome controlled the vast, ill-defined territory through alliances with the tribes rather than through military occupation, expanding its authority only to those areas that were economically useful or that could be defended without additional manpower. Hence, Roman administration never extended outside the restricted area of the northern coastal plain and valleys. This strategic region formed part of the Roman Empire, governed as Mauretania Tingitana, with the city of Volubilis as its capital.
During the time of the Roman emperor Augustus, Mauretania was a vassal state, and its rulers, such as Juba II, controlled all the areas south of Volubilis. But the effective control of Roman legionaries reached as far as the area of Sala Colonia (the castra "Exploratio Ad Mercurios" south of Sala is the southernmost discovered up to now). Some historians believe the Roman frontier reached present-day Casablanca, known then as Anfa, which had been settled by the Romans as a port.
During the reign of Juba II, Augustus founded three colonies of Roman citizens in Mauretania close to the Atlantic coast: Iulia Constantia Zilil, Iulia Valentia Banasa, and Iulia Campestris Babba. Augustus would eventually found twelve colonies in the region.Data and map of Roman Banasa During that period, the area controlled by Rome experienced significant economic development, aided by the construction of Roman roads. The area was initially not completely under the control of Rome, and only in the mid-2nd century was a limes built south of Sala extending to Volubilis. Around 278 CE the Romans moved their regional capital to Tangier and Volubilis started to lose importance.
Christianity was introduced to the region in the 2nd century CE, and gained converts in the towns and among slaves as well as among Berber farmers. By the end of the 4th century, the Romanized areas had been Christianized, and inroads had been made among the Berber tribes, who sometimes converted en masse. Schismatic and heretical movements also developed, usually as forms of political protest. The area had a substantial Jewish population as well.
Early Islamic Morocco (c. 700 – c. 743) Muslim conquest (c. 700)
The Muslim conquest of the Maghreb, that started in the middle of the 7th century CE, was achieved in the early 8th century. It brought both the Arabic language and Islam to the area. Although part of the larger Islamic Empire, Morocco was initially organized as a subsidiary province of Ifriqiya, with the local governors appointed by the Muslim governor in Kairouan.Abun-Nasr 1987, p.33
The indigenous Berber tribes adopted Islam, but retained their customary laws. They also paid taxes and tribute to the new Muslim administration.Abun-Nasr 1987, pp.33–34
Berber Revolt (740–743)
In 740 CE, spurred on by puritanical Kharijite agitators, the native Berber population revolted against the ruling Umayyad Caliphate. The rebellion began among the Berber tribes of western Morocco, and spread quickly across the region. Although the insurrection petered out in 742 CE before it reached the gates of Kairouan, neither the Umayyad rulers in Damascus nor their Abbasid successors managed to re-impose their rule on the areas west of Ifriqiya. Morocco passed out of Umayyad and Abbasid control, and fragmented into a collection of small, independent Berber states such as Berghwata, Sijilmassa and Nekor, in addition to Tlemcen and Tahert in what is now western Algeria.Georges Duby, Atlas Historique Mondial, Larousse Ed. (2000), pp.220 & 224 () The Berbers went on to shape their own version of Islam. Some, like the Banu Ifran, retained their connection with radical puritan Islamic sects, while others, like the Berghwata, constructed a new syncretic faith.Abun-Nasr 1987, p.42G. Deverdun, "Bargẖawāṭa", Encyclopédie berbère, vol. 9, Edisud, 1991, pp.1360–1361
Barghawata (744–1058)
The Barghawatas were a confederation of Berber groups inhabiting the Atlantic coast of Morocco, who belonged to the Masmuda Berber tribal division. After allying with the Sufri Kharijite rebellion in Morocco against the Umayyads, they established an independent state (CE 744 – 1058) in the area of Tamesna on the Atlantic coast between Safi and Salé under the leadership of Tarif al-Matghari.
Emirate of Sijilmasa (757–976)
The Midrarid dynasty or Banu Midrar were a Berber dynasty that ruled the Tafilalt region and founded the city of Sijilmasa in 757. Sijilmasa was a medieval Moroccan city and trade entrepôt at the northern edge of the Sahara desert. The ruins of the town lie for along the River Ziz in the Tafilalt oasis near the town of Rissani. The town's history was marked by several successive invasions by Berber dynasties. Up until the 14th century, as the northern terminus for the western trans-Sahara trade route, it was one of the most important trade centres in the Maghreb during the Middle Ages.
Kingdom of Nekor (710–1019)