The history of Morocco spans several millennia, succeeding the prehistoric cultures of Jebel Irhoud and Taforalt. It dates from the establishment of Mauretania and other ancient Berber kingdoms, to the establishment of the Moroccan state by the Idrisid dynasty followed by other Islamic dynasties, through to the colonial and independence periods.
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 BC, although the area was inhabited by indigenous Berbers for some two thousand years before that. In the 5th century BC, the city-state of Carthage extended its hegemony over the coastal areas. They remained there until the late 3rd century BC, while the hinterland was ruled by indigenous monarchs. Indigenous Berber monarchs ruled the territory from the 3rd century BC until 40 AD, when it was annexed to the Roman Empire. In the mid-5th century AD, 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 AD, but broke away from the Umayyad Caliphate after the Berber Revolt of 740. Half a century later, the Moroccan state was established by the Idrisid dynasty. Under the Almoravid and the Almohad dynasties, Morocco dominated the Maghreb and Muslim Spain. The Saadi dynasty ruled the country from 1549 to 1659, followed by the Alaouites from 1667 onwards, who have since been the ruling dynasty of Morocco.
In 1912, after the First Moroccan Crisis and the Agadir Crisis, the Treaty of Fez was signed, dividing Morocco into French and Spanish protectorates. In 1956, after 44 years of French rule, Morocco regained independence from France, and shortly afterward regained most of the territories under Spanish control. But in the 1960s Morocco gained its independence.
Archaeological excavations have demonstrated the presence of people in Morocco that were ancestral to Homo sapiens, as well as the presence of early human species. The fossilized bones of a 400,000-year-old early human ancestor were discovered in Salé in 1971. The bones of several very early Homo sapiens were excavated at Jebel Irhoud in 1991, these were dated using modern techniques in 2017 and found to be at least 300,000 years old, making them the oldest examples of Homo Sapiens discovered anywhere in the world. In 2007, small perforated seashell beads were discovered in Taforalt that are 82,000 years old, making them the earliest known evidence of personal adornment found anywhere in the world.
In Mesolithic times, between 20,000 and 5000 years ago, the geography of Morocco resembled a savanna more than the present arid landscape. While little is known of settlements in Morocco during that period, excavations elsewhere in the Maghreb region have suggested an abundance of game and forests that would have been hospitable to Mesolithic hunters and gatherers, such as those of the Capsian culture.
During the Neolithic period, which followed the Mesolithic, the savanna was occupied by hunters and herders. The culture of these Neolithic hunters and herders flourished until the region began to desiccate after 5000 BC as a result of climatic changes. The coastal regions of present-day Morocco in the early Neolithic shared in the Cardium Pottery culture that was common to the entire Mediterranean region. Archaeological excavations have suggested that the domestication of cattle and the cultivation of crops both occurred in the region during that period. In the Chalcolithic period, or the copper age, the Beaker culture reached the north coast of Morocco.
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 BC, and soon after[when?] set up depots for salt and ore along the coast and up the rivers of the territory of present-day Morocco. 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 BC.
By the 5th century BC, 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 was an independent tribal Berber kingdom on the Mediterranean coast of north Africa, corresponding to northern modern-day Morocco from about the 3rd century BC. The earliest known king of Mauretania was Bocchus I, who ruled from 110 BC to 81 BC. 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 BC, then a full province after Emperor Caligula had the last king, Ptolemy of Mauretania, executed (AD 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, the Augustus founded three colonies, with 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. 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 AD the Romans moved their regional capital to Tangier and Volubilis started to lose importance.
Christianity was introduced to the region in the 2nd century AD, 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,[clarification needed] 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.
The Muslim conquest of the Maghreb, that started in the middle of the 7th century AD, 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.
In 740 AD, spurred on by puritanical Kharijite agitators, the native Berber population revolted against the ruling Ummayad Caliphate. The rebellion began among the Berber tribes of western Morocco, and spread quickly across the region. Although the insurrection petered out in 742 AD 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. 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.
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.
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 8 kilometres (5 mi) 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.
The Kingdom of Nekor was an emirate centered in the Rif area of Morocco. Its capital was initially located at Temsaman, and then moved to Nekor. The polity was founded in 710 AD by Salih I ibn Mansur through a Caliphate grant. Under his guidance, the local Berber tribes adopted Islam, but later deposed him in favor of one az-Zaydi from the Nafza tribe. They subsequently changed their mind and reappointed Ibn Mansur. His dynasty, the Banū Sālih, thereafter ruled the region until 1019.
In 859, the kingdom became subject to a 62 ship-strong group of Vikings, who defeated a Moorish force in Nekor that had attempted to interfere with their plunderings in the area. After staying for eight days in Morocco, the Vikings went back to Spain and continued up the east coast.
The Idrisid dynasty was a Muslim polity centered in Morocco, which ruled from 788 to 974. Named after the founder Idriss I, the great grandchild of Hasan ibn Ali, the Idrisids are believed by some historians to be the founders of the first Moroccan state.
This equilibrium was upset in the early 900s, when the Fatimid dynasty arrived in the Maghreb. Not long after seizing power in Ifriqiya, the Fatimids invaded Morocco, conquering both Fez and Sijilmassa. Morocco was fragmented in the aftermath, with Fatimid governors, Idrisid loyalists, new puritan groups and interventionists from Umayyad al-Andalus all fighting over the region. Opportunistic local governors sold and re-sold their support to the highest bidder. In 965, the Fatimid caliph al-Muizz invaded Morocco one last time and succeeded in establishing some order. Soon after, however, the Fatimids shifted their empire eastward to Egypt, with a new capital in Cairo.
The Fatimids had assigned the Zirids, a Zenaga Berber clan centered in Ifriqiya, to watch their western dominions. The Zirids, however, were unable to prevent Morocco from spinning out of their control and crumbling into the hands of a collection of local Zenata Berber chieftains, most of them clients of the Caliph of Cordoba, such as the Maghrawa in the region of Fez and itinerant rivals, the Banu Ifran to the east.
Morocco was at its most powerful under a series of Berber dynasties, which rose to power south of the Atlas Mountains and expanded their rule northward, replacing local rulers. The 11th and 12th centuries witnessed the founding of several significant Berber dynasties led by religious reformers, each dynasty based on a tribal confederation that dominated the Maghreb and Al-Andalus for more than 200 years. The Berber dynasties of the (Almoravids, Almohads, Marinids and Wattasids gave the Berber people some measure of collective identity and political unity under a native regime for the first time in their history. The dynasties created the idea of an “imperial Maghreb” under Berber aegis, an idea that survived in some form from another.
The Almoravid dynasty (c.1060-1147) originated among the Lamtuna nomadic Berber tribe belonging to the Sanhaja. They succeeded in unifying Morocco after it had been divided among several Zenata principalities in the late 10th century, and annexed the Emirate of Sijilmasa and the Barghawata (Tamesna) into their realm.
Under Yusuf ibn Tashfin, the Almoravids were invited by the Muslim taifa princes of Al-Andalus to defend their territories from the Christian kingdoms. Their involvement was crucial in preventing the fall of Al-Andalus. After having succeeded in repelling Christian forces in 1086, Yusuf returned to Iberia in 1090 and annexed most of the major taifas.
Almoravid power began to decline in the first half of the 12th century, as the dynasty was weakened after its defeat at the battle of Ourique and because of the agitation of the Almohads. The conquest of the city of Marrakech by the Almohads in 1147 marked the fall of the dynasty. However, fragments of the Almoravids (the Banu Ghaniya) continued to struggle in the Balearic Islands and in Tunisia.
The Almohad movement was started by Ibn Tumart among the Masmuda tribes of southern Morocco. The Almohads first established a Berber state in Tinmel in the Atlas Mountains in roughly 1120. They succeeded in overthrowing the ruling Almoravids in governing Morocco by 1147, when Abd al-Mu'min al-Gumi (r. 1130–1163) conquered Marrakech and declared himself Caliph. They then extended their power over all of the Maghreb by 1159. Al-Andalus followed the fate of the Maghreb and all Islamic Iberia was under Almohad rule by 1172.
The Marinids overthrew the Almohad dynasty controlling Morocco in 1244, and briefly controlled all the Maghreb in the mid-14th century. They supported the Kingdom of Granada in Al-Andalus in the 13th and 14th centuries; an attempt to gain a direct foothold on the European side of the Strait of Gibraltar was however defeated at the Battle of Río Salado in 1340 and finished after the Castilian conquest of Algeciras from the Marinids in 1344.
The Wattasid dynasty were a ruling dynasty of Morocco. Like the Marinids, they were of Zenata Berber descent. The two families were related, and the Marinids recruited many viziers from the Wattasids.
Beginning in 1549, the region was ruled by successive Arab dynasties known as the Sharifian dynasties, who claimed descent from the prophet Muhammad. The first of these polities was the Saadi dynasty, which ruled Morocco from 1549 to 1659. From 1509 to 1549, the Saadi rulers had control of only the southern areas. While still recognizing the Wattasids as Sultans until 1528, Saadian's growing power led the Wattasids to attack them and, after an indecisive battle, to recognize their rule over southern Morocco through the Treaty of Tadla.
The Alaouite dynasty is the current Moroccan royal family. The name Alaouite comes from the ‘Alī of ‘Alī ibn Abī Ṭālib , whose descendant Sharif ibn Ali became Prince of Tafilalt in 1631. His son Mulay Al-Rashid (1664–1672) was able to unite and pacify the country. The Alaouite family claim descent from Muhammad through his daughter Fāṭimah az-Zahrah and her husband ‘Alī ibn Abī Ṭālib.
The kingdom was consolidated by Ismail Ibn Sharif (1672–1727), who began to create a unified state in the face of opposition from local tribes . Since the Alaouites, in contrast to previous dynasties, did not have the support of a single Berber or Bedouin tribe, Isma'īl controlled Morocco through an army of slaves. With these soldiers he drove the English from Tangiers (1684) and the Spanish from Larache in 1689. The unity of Morocco did not survive his death — in the ensuing power struggles the tribes became a political and military force once again, and it was only with Muhammad III (1757–1790) that the kingdom was unified again.The idea of centralization was abandoned and the tribes allowed to preserve their autonomy. On 20 December 1777, Morocco became one of the first states to recognize the sovereignty of a newly independent United States.
During the reigns of Muhammad IV (1859–1873) and Hassan I (1873–1894), the Alaouites tried to foster trade links, especially with European countries and the United States. The army and administration were also modernized to consolidate control over the Berber and Bedouin tribes. In 1859, Morocco went to war with Spain. The independence of Morocco was guaranteed at the Conference of Madrid in 1880, with France also gaining significant influence over Morocco. Germany attempted to counter the growing French influence, leading to the First Moroccan Crisis of 1905–1906, and the Second Moroccan Crisis of 1911. Morocco became a French Protectorate through the Treaty of Fez in 1912.
The successful Portuguese efforts to control the Atlantic coast in the 15th century did not affect the interior of Morocco. After the Napoleonic Wars, North Africa became increasingly ungovernable from Istanbul by the Ottoman Empire. As a result, it became the resort of pirates under local beys. The Maghreb also had far greater known wealth than the rest of Africa, and its location near the entrance to the Mediterranean gave it strategic importance. France showed a strong interest in Morocco as early as 1830. The Alaouite dynasty succeeded in maintaining the independence of Morocco in the 18th and 19th centuries, while other states in the region succumbed to Ottoman, French, or British domination. In the latter part of the 19th century Morocco's instability resulted in European countries intervening to protect investments and to demand economic concessions. The first years of the 20th century saw major diplomatic efforts by European powers, especially France, to further its interests in the region.
In the 1890s, the French administration and military in Algiers called for the annexation of the Touat, the Gourara and the Tidikelt, a complex that had been part of the Moroccan Empire for many centuries prior to the arrival of the French in Algeria.
An armed conflict opposed French 19th Corps Oran and Algiers divisions to the Aït Khabbash, a fraction of the Aït Ounbgui khams of the Aït Atta confederation. The conflict ended by the annexation of the Touat-Gourara-Tidikelt complex by France in 1901.
Recognition by the United Kingdom of France's "sphere of influence" in Morocco in the 1904 Entente Cordiale 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.
Prior to independence, Morocco was home to half a million Europeans, and European Christians formed almost half the population of the city of Casablanca. Since the kingdom's independence in 1956, the European population has decreased substantially.
A second "Moroccan crisis" increased tensions among the powerful European countries, and resulted in the Treaty of Fez (signed on March 30, 1912), which made Morocco a protectorate of France. By a second treaty signed by the French and Spanish heads of state, Spain was granted a Zone of influence in northern and southern Morocco on November 27, 1912. The northern part became the Spanish protectorate in Morocco, while the southern part was ruled from El Aiun as a buffer zone between the Spanish Colony of Rio de Oro and Morocco. The treaty of Fez triggered the 1912 Fez riots. By the Tangier Protocol signed in December 1923, Tangier received special status and became an international zone.
The treaties did not legally deprive Morocco of its status as a sovereign state, and the sultan remained the country's leader. In practice, the sultan had no real power and the country was ruled by a colonial administration.
Under the protectorate, French civil servants allied themselves with the French settlers and with their supporters in France to prevent any moves in the direction of Moroccan autonomy. As pacification proceeded, the French government focused on the exploitation of Morocco's mineral wealth, the creation of a modern transportation system, and the development of a modern agricultural sector geared to the French market. Tens of thousands of colons, or colonists, entered Morocco and acquired large tracts of the rich agricultural land.
In December 1934, a small group of nationalists, members of the newly formed Comité d'Action Marocaine, or Moroccan Action Committee (CAM), proposed a Plan of Reforms that called for a return to indirect rule as envisaged by the Treaty of Fez, admission of Moroccans to government positions, and establishment of representative councils. CAM used petitions, newspaper editorials, and personal appeals to French officials to further its cause, but these proved inadequate, and the tensions created in the CAM by the failure of the plan caused it to split. The 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 declarations such as the Atlantic Charter, a joint United States-British statement that set forth, among other things, the right of all peoples to choose the form of government under which they live. The French regime also faced the opposition of the tribes — when the Berber were required to come under the jurisdiction of French courts in 1930, it increased support for the independence movement.
Many Moroccan Goumiere, or indigenous soldiers in the French army, assisted the Allies in both World War I and World War II. During World War II, the badly divided nationalist movement became more cohesive. However, the nationalists belief that an Allied victory would pave the way for independence was disappointed. 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 Muhammad V (1927–1961) 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 became 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.
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, 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 and rising violence in Morocco, as well as a deteriorating situation in Algeria, the French government brought Mohammed V back to Morocco, and the following year began the negotiations that led to Moroccan independence.
In late 1955, in the middle of what came to be known as the Revolution of the King and the People, Sultan 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, 1956, 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 agreement with Spain in 1956 and another in 1958, Moroccan control over certain Spanish-ruled areas was restored. Attempts to claim other Spanish possessions through military action were less successful.
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, intent on preventing the Istiqlal from consolidating its control and establishing a one-party state. He assumed the monarchy in 1957.
Mohammed V's son Hassan II became King of Morocco on March 3, 1961. His rule saw significant political unrest, and the ruthless government response earned the period the name "the years of lead". Hassan 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.
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. The conflict ended after Organisation of African Unity mediation, with no territorial changes.
The patriotism engendered by Morocco’s participation in the Middle East conflict and by the events in Western Sahara contributed to Hassan’s popularity. The king had dispatched Moroccan troops to the Sinai front after the outbreak of the Arab-Israeli War in October 1973. Although they arrived too late to engage in hostilities, the action won Morocco goodwill among other Arab states. Soon after, the attention of the government turned to the acquisition of Western Sahara from Spain, an issue on which all major domestic parties agreed.
The Spanish enclave of Ifni in the south became part of the new state of Morocco in 1969, but other Spanish possessions in the north, including Ceuta, Melilla and Plaza de soberanía, remained under Spanish control, with Morocco viewing them as occupied territory.
In August 1974, Spain formally acknowledged the 1966 United Nations (UN) resolution calling for a referendum on the future status of the Western Sahara, and requested that a plebiscite be conducted under UN supervision. A UN visiting mission reported in October 1975 that an overwhelming majority of the Saharan people desired independence. Morocco protested the proposed referendum and took its case to the International Court of Justice at The Hague, which ruled that despite historical “ties of allegiance” between Morocco and the tribes of Western Sahara, there was no legal justification for departing from the UN position on self-determination. Spain, meanwhile, had declared that even in the absence of a referendum, it intended to surrender political control of Western Sahara, and Spain, Morocco, and Mauritania convened a tripartite conference to resolve the territory’s future. Spain also announced that it was opening independence talks with the Algerian-backed Saharan independence movement known as the Polisario Front.
In early 1976, Spain ceded the administration of the Western Sahara to Morocco and Mauritania. Morocco assumed control over the northern two-thirds of the territory, and conceded the remaining portion in the south to Mauritania. An assembly of Saharan tribal leaders duly acknowledged Moroccan sovereignty. However, buoyed by the increasing defection of tribal chiefs to its cause, the Polisario drew up a constitution, and announced the formation of the Saharawi Arab Democratic Republic (SADR), and itself formed government-in-exile.
The Moroccan government eventually sent a large portion of its combat forces into Western Sahara to confront the Polisario’s forces, which were relatively small but well-equipped, highly mobile, and resourceful. The Polisario used Algerian bases for quick strikes against targets deep inside Morocco and Mauritania, as well as for operations in Western Sahara. In August 1979, after suffering military losses, Mauritania renounced its claim to Western Sahara and signed a peace treaty with the Polisario. Morocco then annexed the entire territory and, in 1985 built a 2,500-kilometer sand berm around three-quarters of Western Sahara.
In 1988, Morocco and the Polisario Front agreed on a United Nations (UN) peace plan, and a cease-fire and settlement plan went into effect in 1991. Even though the UN Security Council created a peacekeeping force to implement a referendum on self-determination for Western Sahara, it has yet to be held, periodic negotiations have failed, and the status of the territory remains unresolved.
The war against the Polisario guerrillas put severe strains on the economy, and Morocco found itself increasingly isolated diplomatically. Gradual political reforms in the 1990s culminated in the constitutional reform of 1996, which created a new bicameral legislature with expanded, although still limited, powers. Elections for the Chamber of Representatives were held in 1997, reportedly marred by irregularities.
With the death of King Hassan II of Morocco in 1999, the more liberal Crown Prince Sidi Mohammed took the throne, assuming the title Mohammed VI. He enacted successive reforms to modernize Morocco, and human-rights record of the country improved markedly. One of the new king’s first acts was to free approximately 8,000 political prisoners and reduce the sentences of another 30,000. He also established a commission to compensate families of missing political activists and others subjected to arbitrary detention.
In September 2002, new legislative elections were held, and the Socialist Union of Popular Forces (USFP) won a plurality. International observers regarded the elections as free and fair, noting the absence of the irregularities that had plagued the 1997 elections. In May 2003, in honor of the birth of a son, the king ordered the release of 9,000 prisoners and the reduction of 38,000 sentences. Also in 2003, Berber-language instruction was introduced in primary schools, prior to introducing it at all educational levels.
In March 2000, women's groups organized demonstrations in Rabat proposing reforms to the legal status of women in the country. 200,000 to 300,000 women attended, calling for a ban on polygamy, and the introduction of civil divorce law. Although a counter-demonstration attracted 200,000 to 400,000 participants, the movement was influential on King Mohammed, and he enacted a new Mudawana, or family law, in early 2004, meeting some of the demands of women's rights activists.
In July 2002, a crisis broke out with Spain over a small, uninhabited island lying just less than 200 meters from the Moroccan coast, named Toura or Leila by Moroccans and Perejil by Spain. After mediation by the United States, both Morocco and Spain agreed to return to the status quo, under which the island remains deserted.
In May 2003, Islamist suicide bombers simultaneously struck a series of sites in Casablanca, killing 45 and injuring more than 100 others. The Moroccan government responded with a crackdown against Islamist extremists, ultimately arresting several thousand, prosecuting 1,200, and sentencing about 900. Additional arrests followed in June 2004. That same month, the United States designated Morocco a major non-North Atlantic Treaty Organization ally, stating that it was in recognition of its efforts to thwart international terrorism. On January 1, 2006, a comprehensive bilateral free trade agreement between the United States and Morocco took effect. The agreement had been signed in 2004 along with a similar agreement with the European Union, Morocco's main trade partner.