The Capsian culture brought Morocco into the Neolithic about 8000 BC, at a time when the Maghreb was less arid than it is today. The Berber language probably was formed at roughly the same time as agriculture (see Berber), and was developed by the existing population and adopted the immigrants who arrived later. Modern DNA analysis (see link) has confirmed that various populations have contributed to the present-day gene pool of Morocco in addition to the main ethnic group which is the Amazighs/Berbers. Those other various populations are Arabs, Iberians, Phoenicians, Sephardic Jews and sub-Saharan Africans.
In mesolithic ages the geography of Morocco resembled to a savanna more than the present day arid landscape. While little is known about Morocco settlement in these early times, excavations elsewhere in the Maghreb suggest an abundance of game and forests that would have been hospitable to mesolithic Homo sapiens hunters and gatherers.
The coastal regions of present-day Morocco shared in an early Neolithic culture that was common to the whole Mediterranean littoral. Archaeological remains point to the domestication of cattle and the cultivation of crops in the region during that period. Eight thousand years ago, south of the great mountain ranges in what is now the Sahara Desert, a vast savanna supported Neolithic hunters and herders whose culture flourished until the region began to desiccate as a result of climatic changes after 4000 B.C. The Berbers entered Moroccan history toward the end of the 2nd millennium B.C., when they made initial contact with oasis dwellers on the steppe who may have been the remnants of the earlier savanna people.
Phoenician traders, who had penetrated the western Mediterranean before the 12th century B.C., set up depots for salt and ore along the coast and up the rivers of the territory that is now Morocco. The arrival of Phoenicians heralded many centuries of rule by foreign powers for the north of Morocco. Major early substantial settlements of the Phoenicians were at Chellah, Lixus and Mogador, with Mogador being a Phoenician colony as early as the early 6th century BC. 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.
By the 5th century B.C., Carthage had extended its hegemony across much of North Africa. By the 2nd century B.C., several large, although loosely administered, Berber kingdoms had emerged. The Berber kings ruled in the shadow of Carthage and Rome, often as satellites. After the fall of Carthage, the area was annexed to the Roman Empire in A.D. 40. One of the major Moroccan families to have been enslaved were the Jabrane royalty. Famous for their freckles and fair skin, the Berber kings felt uncomfortable for keeping hostages that are fairer in skin than themselves. 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 coastal plain and valleys. This strategic region formed part of the Roman Empire, governed as Mauretania Tingitana. In the 5th century, the region fell to the Vandals, Visigoths, and then Byzantine Greeks in rapid succession. During this time, however, the high mountains of most of modern Morocco remained unsubdued, and stayed in the hands of their Berber inhabitants.
Christianity was introduced in the second century and gained converts in the towns and among slaves and Berber farmers. By the end of the 4th century, the Romanized areas had been Christianized, and inroads had been made as well among the Berber tribes, who sometimes converted en masse. But schismatic and heretical movements also developed, usually as forms of political protest. The area had a substantial Jewish population as well.
Arabs conquered the region in the 7th century, bringing their civilization and Islam, to which many of the Berbers converted. While part of the larger Islamic Empire, client states such as the Kingdom of Nekor were formed. 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 thinly disguised as Islam, as their way of breaking from Arab control.
During 741-1058 the first Muslim country in the region was Barghawata.
Morocco reached its height under a series of Berber dynasties, that arose south of the Atlas Mountains and expanded their rule northwards, replacing the Arab Idrisids. The 11th and 12th 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 Al-Andalus for more than 200 years. The Berber dynasties (Almoravids, Almohads, and Marinids) 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.
In 1559, the region fell to successive Arab tribes claiming descent from the Prophet Muhammad: first the Saadi Dynasty who ruled from 1511 to 1659 and then the Alaouites, who founded a dynasty that has remained in power since the 17th century.
Moulay Ali Cherif consolidated power as the Sultan of Tafilalt and is considered to have been the founder of the Alaouite Dynasty. After the Saadite dynasty fell in 1659 the Alaouites began to take control of Morocco. Moulay Ali Cherif's son, Al-Rashid of Morocco, was proclaimed Sultan of Morocco in Fez, October 22, 1664. Al-Rashid went on and secured Marrakesh September 7, 1668.
The Alaouites succeeded in stabilizing their position, and while the kingdom was smaller than previous ones in the region, it remained quite wealthy. The Alaouites also managed to acquire territory in their region over the course of several centuries. In 1684, they annexed Tangier; in 1687 conquest Taroudant; in 1769 they conquered El Jadida taking it from Portugal;
Morocco was the first nation to recognize the fledgling U.S. as an independent nation, in 1777. The Moroccan-American Treaty of Friendship stands as the U.S.'s oldest non-broken friendship treaty. Signed by John Adams and Thomas Jefferson, it has been in continuous effect since 1783. The United States legation (consulate) in Tangier is the first property the American government ever owned abroad. The building now houses the Tangier American Legation Museum.
Despite the weakness of its authority, the Alaouite dynasty distinguished itself in the 18th and 19th 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 19th century Morocco’s weakness and instability invited European intervention to protect threatened investments and to demand economic concessions. The first years of the 20th 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 World War I.
The successful Portuguese efforts to control the Atlantic coast in the 15th century did not affect the Mediterranean heart of Morocco. After the Napoleonic Wars, Egypt and the North African maghreb became increasingly ungovernable from Istanbul by the Ottoman Empire, the resort of pirates under local beys, and as Europe industrialized, an increasingly prized potential for colonization. The Maghreb had far greater proven wealth than the unknown rest of Africa and a location of strategic importance affecting the exit from the Mediterranean. For the first time, Morocco became a state of some import to the European Powers. France showed a strong interest in Morocco as early as 1830. Recognition by the United Kingdom in 1904 of France's "sphere of influence" in Morocco provoked a German reaction; the "crisis" of 1905-1906 was resolved at the Algeciras Conference (1906), which formalized France's "special position" and entrusted policing of Morocco jointly to France and Spain. A second "Moroccan crisis" provoked by Berlin, increased European Great Power tensions, but the Treaty of Fez (signed on March 30, 1912) made Morocco a protectorate of France. By the same treaty, Spain assumed the role of protecting power over the northern and southern (Ifni) zones on November 27 that year. Spain was given control of pieces of Morocco in the far north (Protectorate of Tetuan) and south (Cape Juby). Tangier received special international status. From a strictly legal point of view, the treaty did not deprive Morocco of its status as a sovereign state. Theoretically, the sultan remained the sole source of sovereignty. He reigned, but he did not rule.
Under the protectorate, French civil servants allied themselves with the French settlers (colons) and with their supporters in France to prevent any moves in the direction of Moroccan autonomy. As pacification proceeded, the French government promoted economic development, particularly the exploitation of Morocco’s mineral wealth, the creation of a modern transportation system, and the development of a modern agriculture sector geared to the French market. Tens of thousands of colons entered Morocco and bought up large amounts of the rich agricultural land. Interest groups that formed among these elements continually pressured France to increase its control over Morocco.
In December 1934, a small group of nationalists—members of the newly formed Moroccan Action Committee (Comité d’Action Marocaine—CAM)—proposed a Plan of Reforms that called for a return to indirect rule as envisaged by the Treaty of Fès, admission of Moroccans to government positions, and establishment of representative councils. The moderate tactics used by the CAM to obtain consideration of reform—petitions, newspaper editorials, and personal appeals to French officials—proved inadequate, and the tensions created in the CAM by the failure of the plan caused it to split. The rump CAM was reconstituted as a nationalist political party to gain mass support for more radical demands, but the French suppressed the party in 1937.
Nationalist political parties, which subsequently arose under the French protectorate, based their arguments for Moroccan independence on such World War II declarations as the Atlantic Charter (a joint U.S.-British statement that set forth, among other things, the right of all people to choose the form of government under which they live).
Many Moroccan Goumiere assisted the Americans in both World War I and World War II. During World War II, the badly divided nationalist movement became more cohesive, and informed Moroccans dared to consider the real possibility of political change in the post-war era. However, the nationalists were disappointed in their belief that the Allied victory in Morocco would pave the way for independence. In January 1944, the Istiqlal (Independence) Party, which subsequently provided most of the leadership for the nationalist movement, released a manifesto demanding full independence, national reunification, and a democratic constitution. The sultan had approved the manifesto before its submission to the French resident general, who answered that no basic change in the protectorate status was being considered. The general sympathy of the sultan for the nationalists had become evident by the end of the war, although he still hoped to see complete independence achieved gradually. By contrast, the residency, supported by French economic interests and vigorously backed by most of the colons, adamantly refused to consider even reforms short of independence. Official intransigence contributed to increased animosity between the nationalists and the colons and gradually widened the split between the sultan and the resident general.
In December 1952, a riot broke out in Casablanca over the murder of a Tunisian labor leader; this event marked a watershed in relations between Moroccan political parties and French authorities. In the aftermath of the rioting, the residency outlawed the new Moroccan Communist Party and the Istiqlal.
France's exile of the highly respected Sultan Mohammed V to Madagascar in 1953 and his replacement by the unpopular Mohammed Ben Aarafa, whose reign was perceived as illegitimate, sparked active opposition to the French protectorate both from nationalists and those who saw the sultan as a religious leader. Two years later, faced with a united Moroccan demand for the sultan’s return, rising violence in Morocco, and the deteriorating situation in Algeria, the French government brought Mohammed V back to Morocco. The negotiations that led to Moroccan independence began the following year.
In late 1955, Mohammed V successfully negotiated the gradual restoration of Moroccan independence within a framework of French-Moroccan interdependence. The sultan agreed to institute reforms that would transform Morocco into a constitutional monarchy with a democratic form of government. In February 1956, Morocco acquired limited home rule. Further negotiations for full independence culminated in the French-Moroccan Agreement signed in Paris on March 2, 1956. On April 7 of that year France officially relinquished its protectorate in Morocco. The internationalized city of Tangier was reintegrated with the signing of the Tangier Protocol on October 29, 1956. The abolition of the Spanish protectorate and the recognition of Moroccan independence by Spain were negotiated separately and made final in the Joint Declaration of April 1956. Through this agreements with Spain in 1956 and another in 1958, Moroccan control over certain Spanish-ruled areas was restored, though attempts to claim other Spanish possessions through military action were less successful.
Almost all speakers of Judeo-Berber language left Morocco in the years following its independence
In the months that followed independence, Mohammed V proceeded to build a modern governmental structure under a constitutional monarchy in which the sultan would exercise an active political role. He acted cautiously, having no intention of permitting more radical elements in the nationalist movement to overthrow the established order. He was also intent on preventing the Istiqlal from consolidating its control and establishing a single-party state. In August 1957, Mohammed V assumed the title of king.
Hassan II became King of Morocco on March 3, 1961. His rule would be marked by political unrest, and the ruthless government response earned the period the name "the years of lead". The new king took personal control of the government as prime minister and named a new cabinet. Aided by an advisory council, he drew up a new constitution, which was approved overwhelmingly in a December 1962 referendum. Under its provisions, the king remained the central figure in the executive branch of the government, but legislative power was vested in a bicameral parliament, and an independent judiciary was guaranteed. In May 1963, legislative elections took place for the first time, and the royalist coalition secured a small plurality of seats. However, following a period of political upheaval in June 1965, Hassan II assumed full legislative and executive powers under a “state of exception,” which remained in effect until 1970. Subsequently, a reform constitution was approved, restoring limited parliamentary government, and new elections were held. However, dissent remained, revolving around complaints of widespread corruption and malfeasance in government. In July 1971 and again in August 1972, the regime was challenged by two attempted military coups. The atmosphere in the country remained tense.
After neighbouring Algeria's 1962 independence from France, border skirmishes in the Tindouf area of south-western Algeria, escalated in 1963 into what is known as the Sand War. Morocco invaded to claim the areas for Greater Morocco, but the fighting stalemated within weeks, and Morocco was forced to retreat with no border adjustments. The border remained a contentious issue, but was later demarcated, and Morocco no longer makes any formal claim on Algerian territory.
More than any other issue since independence, the objective of securing Western Sahara had unified the Moroccan nation. Because of the firm stand the king had taken, it also enhanced his popularity in the country. But the war against the Polisario guerrillas put severe strains on the economy, and Morocco found itself increasingly isolated diplomatically. Successive governments showed little inclination to move seriously against pressing economic and social issues. As a result, popular discontent with social and economic conditions persisted. Political parties continued to proliferate but produced only a divided and weakly organized opposition or were suppressed. Through the force of his strong personality, the legacy of the monarchy, and the application of political repression, the king succeeded in asserting his authority and controlling the forces threatening the existing social order.