# Morocco

Morocco, officially the Kingdom of Morocco, is a country in the Maghreb region of North Africa. It has coastlines on the Mediterranean Sea to the north and the Atlantic Ocean to the west, and has land borders with Algeria to the east, and the disputed territory of Western Sahara to the south. Morocco also claims the Spanish exclaves of Ceuta, Melilla and Peñón de Vélez de la Gomera, and several small Spanish-controlled islands off its coast. It has a population of approximately 37 million. Islam is both the official and predominant religion, while Arabic and Berber are the official languages. Additionally, French and the Moroccan dialect of Arabic are widely spoken. The culture of Morocco is a mix of Arab, Berber, African and European cultures. Its capital is Rabat, while its largest city is Casablanca.
The region constituting Morocco has been inhabited since the Paleolithic era over 300,000 years ago. The Idrisid dynasty was established by Idris I in 788 and Morocco was subsequently ruled by a series of other independent dynasties, reaching its zenith as a regional power in the 11th and 12th centuries, under the Almoravid and Almohad dynasties, when it controlled most of the Iberian peninsula and the Maghreb. Centuries of Arab migration to the Maghreb since the 7th century shifted the demographic scope of the region. In the 15th and 16th centuries, Morocco faced external threats to its sovereignty, with Portugal seizing some territory and the Ottoman Empire encroaching from the east. The Marinid and Saadi dynasties otherwise resisted foreign domination, and Morocco was the only North African nation to escape Ottoman dominion. The 'Alawi dynasty, which rules the country to this day, seized power in 1631, and over the next two centuries expanded diplomatic and commercial relations with the Western world. Morocco's strategic location near the mouth of the Mediterranean drew renewed European interest; in 1912, France and Spain divided the country into respective protectorates, reserving an international zone in Tangier. Following intermittent riots and revolts against colonial rule, in 1956, Morocco regained its independence and reunified.
Since independence, Morocco has remained relatively stable. It has the fifth-largest economy in Africa and wields significant influence in both Africa and the Arab world; it is considered a middle power in global affairs and holds membership in the Arab League, the Arab Maghreb Union, the Union for the Mediterranean, and the African Union. Morocco is a unitary semi-constitutional monarchy with an elected parliament. The executive branch is led by the King of Morocco and the prime minister, while legislative power is vested in the two chambers of parliament: the House of Representatives and the House of Councillors. Judicial power rests with the Constitutional Court, which may review the validity of laws, elections, and referendums. The king holds vast executive and legislative powers, especially over the military, foreign policy and religious affairs; he can issue decrees called dahirs, which have the force of law, and can also dissolve the parliament after consulting the prime minister and the president of the constitutional court.
Morocco claims ownership of the non-self-governing territory of Western Sahara, which it has designated its Southern Provinces. In 1975, after Spain agreed to decolonise the territory and cede its control to Morocco and Mauritania, a guerrilla war broke out between those powers and some of the local inhabitants. In 1979, Mauritania relinquished its claim to the area, but the war continued to rage. In 1991, a ceasefire agreement was reached, but the issue of sovereignty remained unresolved. Today, Morocco occupies two-thirds of the territory, and efforts to resolve the dispute have thus far failed to break the political deadlock.

## Etymology and name

The English Morocco is an anglicisation of the Spanish name for the country, Marruecos, derived from the name of the city of Marrakesh, which was the capital of the Almoravid dynasty, the Almohad Caliphate, and the Saadian dynasty. During the Almoravid dynasty, the city of Marrakesh was established under the name of Tāmurākušt, derived from the city's ancient Berber name of amūr n Yakuš (lit. 'land/country of God'). In English, the first vowel has been changed, likely influenced by the word "Moor".
Historically, the territory has been part of what Muslim geographers referred to as al-Maghrib al-Aqṣā  [ar] (المغرب الأقصى, 'the Farthest West [of the Islamic world]' designating roughly the area from Tiaret to the Atlantic) in contrast with neighbouring regions of al-Maghrib al-Awsaṭ  [ar] (المغرب الأوسط, 'the Middle West': Tripoli to Béjaïa) and al-Maghrib al-Adnā  [ar] (المغرب الأدنى, 'the Nearest West': Alexandria to Tripoli).
Morocco's modern Arabic name is al-Maghrib (المغرب, transl. the land of the sunset; the west), with the Kingdom's official Arabic name being al-Mamlakah al-Maghribīyah (المملكة المغربية; transl. the kingdom of sunset/the west). In Turkish, Morocco is known as Fas, a name derived from its medieval capital of Fes which is derived from the Arabic word Faʾs (فأس; transl. pickaxe), as the city's founder Idris I ibn Abd Allah reputedly used a silver and gold pickaxe to trace the outlines of the city. In other parts of the Islamic world, for example in Egyptian and Middle Eastern Arabic literature before the mid-20th century, Morocco was commonly referred to as Murrakush (مراكش). The term is still used to refer to Morocco today in several Indo-Iranian languages, including Persian, Urdu, and Punjabi.
Morocco has also been referred to politically by a variety of terms denoting the Sharifi heritage of the 'Alawi dynasty, such as al-Mamlakah ash-Sharīfah (المملكة الشريفة), al-Iyālah ash-Sharīfah (الإيالة الشريفة) and al-Imbarāṭūriyyah ash-Sharīfah (الإمبراطورية الشريفة), rendered in French as l'Empire chérifien and in English as the 'Sharifian Empire'.

## History
### Prehistory and antiquity

The area of present-day Morocco has been inhabited since at least Paleolithic times, beginning sometime between 190,000 and 90,000 BC. A recent publication has suggested that there is evidence for even earlier human habitation of the area: Homo sapiens fossils that had been discovered in the late 2000s near the Atlantic coast in Jebel Irhoud were recently dated to roughly 315,000 years ago. During the Upper Paleolithic, the Maghreb was more fertile than it is today, resembling a savanna, in contrast to its modern arid landscape.
DNA studies of Iberomaurusian peoples at Taforalt, Morocco dating to around 15,000 years ago have found them to have a distinctive Maghrebi ancestry formed from a mixture of Near Eastern and African ancestry, which is still found as a part of the genome of modern Northwest Africans. Later during the Neolithic, from around 7,500 years ago onwards, there was a migration into Northwest Africa of European Neolithic Farmers from the Iberian Peninsula (who had originated in Anatolia several thousand years prior), as well as pastoralists from the Levant, both of whom also significantly contributed to the ancestry of modern Northwest Africans. The proto-Berber tribes evolved from these prehistoric communities during the late Bronze- and early Iron ages.
In the early part of Classical Antiquity, Northwest Africa and Morocco were slowly drawn into the wider emerging Mediterranean world by the Phoenicians, who established trading colonies and settlements there, the most substantial of which were Chellah, Lixus, and Mogador. Mogador was established as a Phoenician colony as early as the 6th century BC.
Morocco later became a realm of the Northwest African civilisation of ancient Carthage, and part of the Carthaginian empire. The earliest known independent Moroccan state was the Berber kingdom of Mauretania, under King Baga. This ancient kingdom (not to be confused with the modern state of Mauritania) flourished around 225 BC or earlier. Mauretania became a client kingdom of the Roman Empire in 33 BC. Emperor Claudius annexed Mauretania directly in 44 AD, making it a Roman province ruled by an imperial governor (either a procurator Augusti, or a legatus Augusti pro praetore).
Christianity in Morocco appeared during the Roman times, when it was practiced by Berber Christians in Roman Mauretania Tingitana. During the Crisis of the Third Century, parts of Mauretania were reconquered by Berbers. By the late 3rd century, direct Roman rule had become confined to a few coastal cities, such as Septum (Ceuta) in Mauretania Tingitana and Cherchell in Mauretania Caesariensis. When, in 429 AD, the area was devastated by the Vandals, the Roman Empire lost its remaining possessions in Mauretania, and local Mauro-Roman kings assumed control of them. In the 530s, the Eastern Roman Empire, under Byzantine control, re-established direct imperial rule of Septum and Tingi, fortified Tingis and erected a church.

### Foundation and dynasties

The Muslim conquest of the Maghreb that had begun during the mid-7th century was completed under the Umayyad Caliphate by 709. The caliphate introduced both Islam and the Arabic language to the area; this period also saw the beginning of a trend of Arab migration to the Maghreb which would last for centuries and effect a demographic shift in the region. While constituting part of the larger empire, Morocco was initially organised as a subsidiary province of Ifriqiya, with the local governors appointed by the Muslim governor in Kairouan.
The indigenous Berber tribes adopted Islam, but retained their customary laws. They also paid taxes and tribute to the new Muslim administration. The first independent Muslim state in the area of modern Morocco was the Kingdom of Nekor, an emirate in the Rif Mountains. It was founded by Salih I ibn Mansur in 710, as a client state to the Umayyad Caliphate. After the outbreak of the Berber Revolt in 739, the Berbers formed other independent states such as the Miknasa of Sijilmasa and the Barghawata.
The founder of the Idrisid dynasty and the great-grandson of Hasan ibn Ali, Idris ibn Abdallah, had fled to Morocco after the massacre of his family by the Abbasids in the Hejaz. He convinced the Awraba Berber tribes to break their allegiance to the distant Abbasid caliphs and he founded the Idrisid dynasty in 788. The Idrisids established Fes as their capital and Morocco became a centre of Muslim learning and a major regional power. The Idrisids were ousted in 927 by the Fatimid Caliphate and their Miknasa allies. After Miknasa broke off relations with the Fatimids in 932, they were removed from power by the Maghrawa of Sijilmasa in 980.
From the 11th century onward, a series of Berber dynasties arose. Under the Sanhaja Almoravid dynasty and the Masmuda Almohad dynasty, Morocco dominated the Maghreb, al-Andalus in Iberia, and the western Mediterranean region. From the 13th century onward the country saw a massive migration of the Banu Hilal Arab tribes. In the 13th and 14th centuries the Zenata Berber Marinids held power in Morocco and strove to replicate the successes of the Almohads through military campaigns in Algeria and Spain. They were followed by the Wattasids. In the 15th century, the Reconquista ended Muslim rule in Iberia and many Muslims and Jews fled to Morocco. Portuguese efforts to control the Atlantic sea trade in the 15th century did not greatly affect the interior of Morocco even though they managed to control some possessions on the Moroccan coast but not venturing further afield inland.
In 1549, the region fell to successive Arab dynasties claiming descent from the Islamic prophet Muhammad: first the Saadi dynasty who ruled from 1549 to 1659, and then the Alawi dynasty, who have remained in power since the 17th century. Morocco faced aggression from Spain in the north, and the Ottoman Empire's allies pressing westward.
Under the Saadis, the sultanate ended the Portuguese Aviz dynasty in 1578 at the Battle of Alcácer Quibir. The reign of Ahmad al-Mansur brought new wealth and prestige to the Sultanate, and a large expedition to West Africa inflicted a crushing defeat on the Songhay Empire in 1591. However, managing the territories across the Sahara proved too difficult. Upon the death of al-Mansur, the country was divided among his sons.
After a period of political fragmentation and conflict during the decline of the Saadi dynasty, Morocco was finally reunited by the Alawi sultan al-Rashid in the late 1660s, who took Fez in 1666 and Marrakesh in 1668.$^{:230}$$^{:225}$ The 'Alawis succeeded in stabilising their position, and while the kingdom was smaller than previous ones in the region, it remained quite wealthy. Against the opposition of local tribes Ismail Ibn Sharif (1672–1727) began to create a unified state. With his Riffian army, he re-occupied Tangier from the English who had abandoned it in 1684 and drove the Spanish from Larache in 1689. The Portuguese abandoned Mazagão, their last territory in Morocco, in 1769. However, the siege of Melilla against the Spanish ended in defeat in 1775.
Morocco was the first nation to recognise the fledgling United States as an independent nation in 1777. In the beginning of the American Revolution, American merchant ships in the Atlantic Ocean were subject to attacks by other fleets. On 20 December 1777, Morocco's Sultan Mohammed III declared that American merchant ships would be under the protection of the sultanate and could thus enjoy safe passage. The 1786 Moroccan–American Treaty of Friendship stands as the United States' oldest unbroken friendship treaty.

### French and Spanish protectorates

As Europe industrialised, Northwest Africa was increasingly prized for its potential for colonisation. France showed a strong interest in Morocco as early as 1830, not only to protect the border of its Algerian territory, but also because of the strategic position of Morocco with coasts on the Mediterranean and the open Atlantic. In 1860, a dispute over Spain's Ceuta enclave led Spain to declare war. Victorious Spain won a further enclave and an enlarged Ceuta in the settlement. In 1884, Spain created a protectorate in the coastal areas of Morocco.
In 1904, France and Spain carved out zones of influence in Morocco. Recognition by the United Kingdom of France's sphere of influence provoked a strong reaction from the German Empire; and a crisis loomed in 1905. The matter was resolved at the Algeciras Conference in 1906. The Agadir Crisis of 1911 increased tensions between European powers. The 1912 Treaty of Fez made Morocco a protectorate of France, and triggered the 1912 Fez riots. Spain continued to operate its coastal protectorate. By the same treaty, Spain assumed the role of protecting power over the northern coastal and southern Saharan zones.
Tens of thousands of colonists entered Morocco. Some bought up large amounts of rich agricultural land, while others organised the exploitation and modernisation of mines and harbours. Interest groups that formed among these elements continually pressured France to increase its control over Morocco – with some Moroccan tribes allying with the French against other competing tribes from early on in its conquest. The French colonial administrator, Governor general Marshal Hubert Lyautey, sincerely admired Moroccan culture and succeeded in imposing a joint Moroccan-French administration, while creating a modern school system. Several divisions of Moroccan soldiers (Goumiers or regular troops and officers) served in the French army in both World War I and World War II, and in the Spanish Nationalist Army in the Spanish Civil War and after (Regulares). The institution of slavery was abolished in 1925.
Between 1921 and 1926, an uprising in the Rif Mountains, led by Abd el-Krim, led to the establishment of the Republic of the Rif. The Spanish used anti-civilian bombing raids and mustard gas to prevent the Rif republic from gaining independence. They lost more than 13,000 soldiers at Annual in July–August 1921 alone. The Riffi were eventually suppressed by 1927 by the Franco-Spanish military. The casualties on the Spanish-French side were 52,000 and from the Riffi 10,000 died.
In 1943, the Istiqlal Party (Independence Party) was founded to press for independence, with discreet US support. Moroccan nationalists drew heavily on transnational activist networks for lobbying to end colonial rule, primarily at the United Nations. The Istiqlal Party subsequently provided most of the leadership for the nationalist movement.
France's exile of Sultan Mohammed V in 1953 to Madagascar and his replacement by the unpopular Mohammed Ben Aarafa sparked active opposition to the French and Spanish protectorates. The most notable violence occurred in Oujda where Moroccans attacked French and other European residents in the streets. France allowed Mohammed V to return in 1955, and the negotiations that led to Moroccan independence began the following year. In March 1956 Morocco regained its independence from France as the Kingdom of Morocco. A month later Spain forsook its protectorate in Northern Morocco to the new state but kept its two coastal enclaves (Ceuta and Melilla) on the Mediterranean coast which dated from earlier conquests, but over which Morocco still claims sovereignty to this day.

### Post-independence

Sultan Mohammed became King in 1957. Upon the death of Mohammed V, Hassan II became King of Morocco on 3 March 1961. Morocco held its first general elections in 1963. However, Hassan declared a state of emergency and suspended parliament in 1965. In 1971 and 1972, there were two failed attempts to depose the king and establish a republic. A truth commission set up in 2005 to investigate human rights abuses during his reign confirmed nearly 10,000 cases, ranging from death in detention to forced exile. Some 592 people were recorded killed during Hassan's rule according to the truth commission.
In 1963, the Sand War was fought between Algerian and Moroccan troops over Moroccan claims to parts of Algerian territory. A formal peace agreement was signed in February 1964; however, relations remained strained between the two countries following the conflict. The Spanish enclave of Ifni in the south was returned to Morocco in 1969.
The Polisario movement was formed in 1973, with the aim of establishing an independent state in the Spanish Sahara. On 6 November 1975, King Hassan asked for volunteers to cross into the Spanish Sahara. Some 350,000 civilians were reported as being involved in the "Green March". A month later, Spain agreed to leave the Spanish Sahara, soon to become Western Sahara, and to transfer it to joint Moroccan-Mauritanian control, despite the objections and threats of military intervention by Algeria. Moroccan forces occupied the territory.
Moroccan and Algerian troops soon clashed in Western Sahara. Morocco and Mauritania divided up Western Sahara. Fighting between the Moroccan military and Polisario forces continued for many years. The prolonged war was a considerable financial drain on Morocco. In 1983, Hassan cancelled planned elections amid political unrest and economic crisis. In 1984, Morocco left the Organisation of African Unity in protest at the SADR's admission to the body. Polisario claimed to have killed more than 5,000 Moroccan soldiers between 1982 and 1985. Algerian authorities have estimated the number of Sahrawi refugees in Algeria to be 165,000. Diplomatic relations with Algeria were restored in 1988. In 1991, a UN-monitored ceasefire began in Western Sahara, but the territory's status remains undecided and ceasefire violations are reported. The following decade saw much wrangling over a proposed referendum on the future of the territory but the deadlock was not broken.
Political reforms in the 1990s resulted in the establishment of a bicameral legislature with Morocco's first opposition-led government coming to power. King Hassan II died in 1999 and was succeeded by his son, Mohammed VI. He is a cautious moderniser who has introduced some economic and social liberalisation. Mohammed VI paid a controversial visit to the Western Sahara in 2002. Morocco unveiled an autonomy blueprint for Western Sahara to the United Nations in 2007. The Polisario rejected the plan and put forward its own proposal. Morocco and the Polisario Front held UN-sponsored talks in New York City but failed to come to any agreement. In 2010, security forces stormed a protest camp in the Western Sahara, triggering violent demonstrations in the regional capital El Aaiún.
In 2002, Morocco and Spain agreed to a US-brokered resolution over the disputed island of Perejil. Spanish troops had taken the normally uninhabited island after Moroccan soldiers landed on it and set up tents and a flag. There were renewed tensions in 2005, as dozens of African migrants stormed the borders of the Spanish enclaves of Melilla and Ceuta. In response, Spain deported dozens of the illegal migrants to Morocco from Melilla. In 2006, the Spanish Premier Zapatero visited Spanish enclaves. He was the first Spanish leader in 25 years to make an official visit to the territories. The following year, Spanish King Juan Carlos I visited Ceuta and Melilla, further angering Morocco which demanded control of the enclaves.
During the 2011–2012 Moroccan protests, thousands of people rallied in Rabat and other cities calling for political reform and a new constitution curbing the powers of the king. In July 2011, the King won a landslide victory in a referendum on a reformed constitution he had proposed to placate the Arab Spring protests. In the first general elections that followed, the moderate Islamist Justice and Development Party won a plurality of seats, with Abdelilah Benkirane being designated as head of government per the new constitution. Despite the reforms made by Mohammed VI, demonstrators continued to call for deeper reforms. Hundreds took part in a trade union rally in Casablanca in May 2012. Participants accused the government of failing to deliver on reforms.
On 24 August 2021, neighbouring Algeria cut diplomatic relations with Morocco, accusing Morocco of supporting a separatist group and hostile actions against Algeria. Morocco called the decision unjustified. Foreign Minister Ramtane Lamamra accused Morocco of using Pegasus spyware against its officials. Amnesty International found that two phones of Sahraoui human rights defender Aminatou Haidar were infected in November 2021.
On 8 September 2023, a 6.8 magnitude earthquake hit Morocco killing more than 2,800 people and injuring thousands. The epicentre of the quake was around 70 km southwest of city of Marrakech.
On 10 December 2020, the Israel–Morocco normalisation agreement was announced, and Morocco announced its intention to resume diplomatic relations with Israel. Joint Declaration of the Kingdom of Morocco, the United States of America and the State of Israel was signed on 22 December 2020. The agreement was met with criticism due to the October 2023 Israel–Hamas war. Moroccan Foreign Minister Nasser Bourita argues that maintaining relations does not signify endorsement of Israeli government actions.

## Geography

Morocco has a coast by the Atlantic Ocean that reaches past the Strait of Gibraltar into the Mediterranean Sea. It is bordered by Spain to the north (a water border through the Strait and land borders with three small Spanish-controlled exclaves, Ceuta, Melilla and Peñón de Vélez de la Gomera), Algeria to the east, and Western Sahara to the south. Since Morocco controls most of Western Sahara, its de facto southern boundary is with Mauritania. The geography of Morocco spans from the Atlantic Ocean, to mountainous areas, to the Sahara desert. Morocco is a Northern African country, bordering the North Atlantic Ocean and the Mediterranean Sea, between Algeria and the annexed Western Sahara. It is one of only three nations (along with Spain and France) to have both Atlantic and Mediterranean coastlines.
A large part of Morocco is mountainous. The Atlas Mountains are located mainly in the centre and the south of the country. The Rif Mountains are located in the north of the country. Both ranges are mainly inhabited by the Berber people. Its total area is about 446,300 km$^2$ (172,317 sq mi). Algeria borders Morocco to the east and southeast, though the border between the two countries has been closed since 1994. The internationally recognised borders of the country lie between latitudes 27° and 36°N, and longitudes 1° and 14°W. Morocco's capital city is Rabat, a city that is beside the Oued Bou Regreg River; its largest city is its main port, Casablanca. Other cities recording a population over 500,000 in the 2014 Moroccan census are Fes, Marrakesh, Meknes, Salé and Tangier.
The Rif mountains stretch over the region bordering the Mediterranean from the northwest to the northeast. The Atlas Mountains run down the backbone of the country, from the northeast to the southwest. Most of the southeast portion of the country is in the Sahara Desert and as such is generally sparsely populated and unproductive economically. Most of the population lives to the north of these mountains, with Morocco's largest cities encapsulated by the Middle Atlas and the High Atlas mountain range, while to the south lies the Western Sahara, a former Spanish colony that was annexed by Morocco in 1975 during the Green March. Morocco claims that the Western Sahara is part of its territory and refers to that as its Southern Provinces.
Spanish territory in Northwest Africa neighbouring Morocco comprises five enclaves on the Mediterranean coast: Ceuta, Melilla, Peñón de Vélez de la Gomera, Peñón de Alhucemas, the Chafarinas islands and the disputed islet Perejil. Off the Atlantic coast the Canary Islands belong to Spain, whereas Madeira to the north is Portuguese. To the north, Morocco is bordered by the Strait of Gibraltar, where international shipping has unimpeded transit passage between the Atlantic and Mediterranean.
Morocco is represented in the ISO 3166-1 alpha-2 geographical encoding standard by the symbol MA. This code was used as the basis for Morocco's internet domain, .ma.

### Climate

In area, Morocco's climate is mainly "hot summer Mediterranean" (Csa) and "hot desert" (BWh) zones.
Central mountain ranges and the effects of the cold Canary Current, off the Atlantic coast, are significant factors in Morocco's relatively large variety of vegetation zones, ranging from lush forests in the northern and central mountains, giving way to steppe, semi-arid and desert areas in the eastern and southern regions. The Moroccan coastal plains experience moderate temperatures even in summer.
In the Rif, Middle and High Atlas Mountains, there exist several different types of climates: Mediterranean along the coastal lowlands, giving way to a humid temperate climate at higher elevations with sufficient moisture to allow for the growth of different species of oaks, moss carpets, junipers, and Atlantic fir which is a royal conifer tree endemic to Morocco. In the valleys, fertile soils and high precipitation allow for the growth of thick and lush forests. Cloud forests can be found in the west of the Rif Mountains and Middle Atlas Mountains. At higher elevations, the climate becomes alpine in character, and can sustain ski resorts.
Southeast of the Atlas mountains, near the Algerian borders, the climate becomes very dry, with long and hot summers. Extreme heat and low moisture levels are especially pronounced in the lowland regions east of the Atlas range due to the rain shadow effect of the mountain system. The southeasternmost portions of Morocco are very hot, and include portions of the Sahara desert, where vast swathes of sand dunes and rocky plains are dotted with lush oases.
In contrast to the Sahara region in the south, coastal plains are fertile in the central and northern regions of the country, and comprise the backbone of the country's agriculture, in which 95% of the population live. The direct exposure to the North Atlantic Ocean, the proximity to mainland Europe and the long stretched Rif and Atlas mountains are the factors of the rather European-like climate in the northern half of the country. That makes Morocco a country of contrasts. Forested areas cover about 12% of the country while arable land accounts for 18%. Approximately 5% of Moroccan land is irrigated for agricultural use.
In general, apart from the southeast regions (pre-Saharan and desert areas), Morocco's climate and geography are very similar to the Iberian peninsula. Thus Morocco has the following climate zones:
* Mediterranean: Dominates the coastal Mediterranean regions of the country, along the (500 km strip), and some parts of the Atlantic coast. Summers are hot to moderately hot and dry, average highs are between 29 °C (84.2 °F) and 32 °C (89.6 °F). Winters are generally mild and wet, daily average temperatures hover around 9 °C (48.2 °F) to 11 °C (51.8 °F), and average low are around 5 °C (41.0 °F) to 8 °C (46.4 °F), typical to the coastal areas of the west Mediterranean. Annual Precipitation in this area varies from 600 to 800 mm in the west to 350–500 mm in the east. Notable cities that fall into this zone are Tangier, Tetouan, Al Hoceima, Nador and Safi.
* Sub-Mediterranean: It influences cities that show Mediterranean characteristics, but remain fairly influenced by other climates owing to their either relative elevation, or direct exposure to the North Atlantic Ocean. There are thus two main influencing climates:
   * Oceanic: Determined by the cooler summers, where highs are around 27 °C (80.6 °F) and in terms of the Essaouira region, are almost always around 21 °C (69.8 °F). The medium daily temperatures can get as low as 19 °C (66.2 °F), while winters are chilly to mild and wet. Annual precipitation varies from 400 to 700 mm. Notable cities that fall into this zone are Rabat, Casablanca, Kénitra, Salé and Essaouira.
   * Continental: Determined by the bigger gap between highs and lows, that results in hotter summers and colder winters, than found in typical Mediterranean zones. In summer, daily highs can get as high as 40 °C (104.0 °F) during heat waves, but usually are between 32 °C (89.6 °F) and 36 °C (96.8 °F). However, temperatures drop as the sun sets. Night temperatures usually fall below 20 °C (68.0 °F), and sometimes as low as 10 °C (50.0 °F) in mid-summer. Winters are cooler, and can get below the freezing point multiple times between December and February. Also, snow can fall occasionally. Fès for example registered −8 °C (17.6 °F) in winter 2005. Annual precipitation varies between 500 and 900 mm. Notable cities are Fès, Meknès, Chefchaouen, Beni-Mellal and Taza.
* Continental: Dominates the mountainous regions of the north and central parts of the country, where summers are hot to very hot, with highs between 32 °C (89.6 °F) and 36 °C (96.8 °F). Winters on the other hand are cold, and lows usually go beyond the freezing point. And when cold damp air comes to Morocco from the northwest, for a few days, temperatures sometimes get below −5 °C (23.0 °F). It often snows abundantly in this part of the country. Precipitation varies between 400 and 800 mm. Notable cities are Khenifra, Imilchil, Midelt and Azilal.
* Alpine: Found in some parts of the Middle Atlas Mountain range and the eastern part of the High Atlas Mountain range. Summers are very warm to moderately hot, and winters are longer, cold and snowy. Precipitation varies between 400 and 1200 mm. In summer highs barely go above 30 °C (86.0 °F), and lows are cool and average below 15 °C (59.0 °F). In winters, highs average around 8 °C (46.4 °F), and lows go well below the freezing point. In this part of the country, there are many ski resorts, such as Oukaimeden and Mischliefen. Notable cities are Ifrane, Azrou and Boulmane.
* Semi-arid: This type of climate is found in the south of the country and some parts of the east of the country, where rainfall is lower and annual precipitations are between 200 and 350 mm. However, one usually finds Mediterranean characteristics in those regions, such as the precipitation pattern and thermal attributes. Notable cities are Agadir, Marrakesh and Oujda.
South of Agadir and east of Jerada near the Algerian borders, arid and desert climate starts to prevail.
Due to Morocco's proximity to the Sahara desert and the North Sea of the Atlantic Ocean, two phenomena occur to influence the regional seasonal temperatures, either by raising temperatures by 7–8 degrees Celsius when sirocco blows from the east creating heatwaves, or by lowering temperatures by 7–8 degrees Celsius when cold damp air blows from the northwest, creating a coldwave or cold spell. However, these phenomena do not last for more than two to five days on average.
Climate change is expected to significantly impact Morocco on multiple dimensions. As a coastal country with hot and arid climates, environmental impacts are likely to be wide and varied. As of the 2019 Climate Change Performance Index, Morocco was ranked second in preparedness behind Sweden.

### Biodiversity

Morocco has a wide range of biodiversity. It is part of the Mediterranean basin, an area with exceptional concentrations of endemic species undergoing rapid rates of habitat loss, and is therefore considered to be a hotspot for conservation priority. Avifauna are notably variant. The avifauna of Morocco includes a total of 454 species, five of which have been introduced by humans, and 156 are rarely or accidentally seen. Morocco is home to six terrestrial ecoregions: Mediterranean conifer and mixed forests, Mediterranean High Atlas juniper steppe, Mediterranean acacia-argania dry woodlands and succulent thickets, Mediterranean dry woodlands and steppe, Mediterranean woodlands and forests and North Saharan steppe and woodlands.
The Barbary lion, hunted to extinction in the wild, was a subspecies native to Morocco and is a national emblem. The last Barbary lion in the wild was shot in the Atlas Mountains in 1922. The other two primary predators of northern Africa, the Atlas bear and Barbary leopard, are now extinct and critically endangered, respectively. Relic populations of the West African crocodile persisted in the Draa river until the 20th century. The Barbary macaque, a primate endemic to Morocco and Algeria, is also facing extinction due to offtake for trade human interruption, urbanisation, wood and real estate expansion that diminish forested area—the macaque's habitat.
Trade of animals and plants for food, pets, medicinal purposes, souvenirs and photo props is common across Morocco, despite laws making much of it illegal. This trade is unregulated and causing unknown reductions of wild populations of native Moroccan wildlife. Because of the proximity of northern Morocco to Europe, species such as cacti, tortoises, mammal skins, and high-value birds (falcons and bustards) are harvested in various parts of the country and exported in appreciable quantities, with especially large volumes of eel harvested – 60 tons exported to the Far East in the period 2009‒2011.

## Government and politics

According to the 2022 Economist Democracy Index, Morocco is ruled under a hybrid regime, scoring #3 in the Middle East and North Africa, and #95 in the world. Morocco has a "difficult" ranking on the 2023 World Press Freedom Index.
Following the March 1998 elections, a coalition government headed by opposition socialist leader Abderrahmane Youssoufi and composed largely of ministers drawn from opposition parties, was formed. Prime Minister Youssoufi's government was the first ever government drawn primarily from opposition parties, and also represents the first opportunity for a coalition of socialists, left-of-centre, and nationalist parties to be included in the government until October 2002. It was also the first time in the modern political history of the Arab world that the opposition assumed power following an election. The current government is headed by Aziz Akhannouch.
The Constitution of Morocco provides for a monarchy with a Parliament and an independent judiciary. With the 2011 constitutional reforms, the King of Morocco retains less executive powers whereas those of the prime minister have been enlarged. The constitution grants the king honorific powers (among other powers); he is both the secular political leader and the "Commander of the Faithful" as a direct descendant of the Prophet Mohammed. He presides over the Council of Ministers; appoints the Prime Minister from the political party that has won the most seats in the parliamentary elections, and on recommendations from the latter, appoints the members of the government.
The constitution of 1996 theoretically allowed the king to terminate the tenure of any minister, and after consultation with the heads of the higher and lower Assemblies, to dissolve the Parliament, suspend the constitution, call for new elections, or rule by decree. The only time this happened was in 1965. The King is formally the commander-in-chief of the armed forces.

### Legislative branch

Since the constitutional reform of 1996, the bicameral legislature consists of two chambers. The Assembly of Representatives of Morocco (Majlis an-Nuwwâb/Assemblée des Répresentants) has 395 members elected for a five-year term, 305 elected in multi-seat constituencies and 90 in national lists consisting of women and youth.
The Assembly of Councillors (Majlis al-Mustasharin) has 120 members, elected for a six-year term. 72 members are elected at the regional level, 20 members are elected from trade unions, 8 seats from professional organisations and 20 from wage-earners.
The Parliament's powers, though still relatively limited, were expanded under the 1992 and 1996 and even further in the 2011 constitutional revisions and include budgetary matters, approving bills, questioning ministers, and establishing ad hoc commissions of inquiry to investigate the government's actions. The lower chamber of Parliament may dissolve the government through a vote of no confidence.
The latest parliamentary elections were held on 8 September 2021. Voter turnout in these elections was estimated to be 50.35% of registered voters.

### Administrative divisions

Morocco is officially divided into 12 regions, which, in turn, are subdivided into 62 provinces and 13 prefectures.
Regions
* Tanger-Tetouan-Al Hoceima
* Oriental
* Fès-Meknès
* Rabat-Salé-Kénitra
* Béni Mellal-Khénifra
* Casablanca-Settat
* Marrakesh-Safi
* Drâa-Tafilalet
* Souss-Massa
* Guelmim-Oued Noun
* Laâyoune-Sakia El Hamra
* Dakhla-Oued Ed-Dahab

### Foreign relations

Morocco is a member of the United Nations and belongs to the African Union (AU), Arab League, Arab Maghreb Union (UMA), Organisation of Islamic Cooperation (OIC), the Non-Aligned Movement and the Community of Sahel–Saharan States (CEN–SAD). Morocco's relationships vary greatly between African, Arab and Western states. Morocco has had strong ties to the West in order to gain economic and political benefits. France and Spain remain the primary trade partners, as well as the primary creditors and foreign investors in Morocco. From the total foreign investments in Morocco, the European Union invests approximately 73.5%, whereas the Arab world invests only 19.3%. Many countries from the Persian Gulf and Maghreb regions are getting more involved in large-scale development projects in Morocco.
In 2002, a dispute with Spain in 2002 over the small island of Perejil arose, which brought attention to the issue of the sovereignty of Melilla and Ceuta. These small enclaves on the Mediterranean coast are surrounded by Morocco and have been under Spanish administration for centuries.
In 2004, the George W. Bush administration granted Morocco the status of major non-NATO ally. Morocco was the first country in the world to recognise US sovereignty, in 1777. After gaining independence, Morocco established strong ties with the United States, receiving significant economic and military aid. This partnership flourished during the Cold War, with Morocco becoming a key ally against communist expansion in North Africa. In return, the US supported Morocco's territorial ambitions and efforts to modernise its economy. Morocco received more than $400 million in American aid between 1957 and 1963, which elevated it to the fifth-largest recipient of US agricultural assistance by 1966. The long-lasting relationship between the two nations has endured, with the US remaining one of Morocco's top allies. Additionally, Morocco is included in the European Union's European Neighbourhood Policy (ENP), which aims at bringing the EU and its neighbours closer.
Morocco's membership in the African Union has been marked by significant events. In 1984, Morocco withdrew from the organisation after it admitted the Sahrawi Arab Democratic Republic in 1982 without conducting a referendum of self-determination in the disputed territory of Western Sahara. This decision was made unilaterally by Morocco. However, in 2017, Morocco rejoined the AU, signaling a shift in its diplomatic stance. In November 2020, Brahim Ghali, leader of the Polisario Front and the Sahrawi president, unilaterally ended a 29-year-old ceasefire agreement with Morocco overseen by the United Nations. In December 2020, Morocco had started to pursue military cooperation with Israel from a normalization agreement. Algeria backs the Polisario Front of Morocco's breakaway state, the Western Sahara. In August 2021, Algeria severed diplomatic relations with Morocco. Algerian authorities have accused Rabat of supporting the Movement for the Self-Determination of Kabylie (MAK), which it classifies as a terrorist organisation.

### Western Sahara status

The status of the Saguia el-Hamra and Río de Oro regions is disputed. The Western Sahara War saw the Polisario Front, the Sahrawi rebel national liberation movement, battling both Morocco and Mauritania between 1976 and a ceasefire in 1991. The Moroccan government has stated that their claimed area of Western Sahara is referred to as the "Southern Provinces". A United Nations mission, MINURSO, is tasked with organising a referendum on whether the territory should become independent or recognised as a part of Morocco.
Part of the territory, the Free Zone, is a mostly uninhabited area that the Polisario Front controls as the Sahrawi Arab Democratic Republic. Its administrative headquarters are located in Tindouf, Algeria. As of 2006, no UN member state had recognised Moroccan sovereignty over Western Sahara. In 2006, the government of Morocco suggested autonomous status for the region through the Moroccan Royal Advisory Council for Saharan Affairs (CORCAS). The project was presented to the United Nations Security Council in mid-April 2007. The proposal was encouraged by Moroccan allies such as the United States, France, and Spain. The Security Council has called upon the parties to enter into direct and unconditional negotiations to reach a mutually accepted political solution.
In 2020, the United States under the Trump administration became the first Western country to back Morocco's contested sovereignty over the disputed Western Sahara region, on the agreement that Morocco would simultaneously normalise relations with Israel. The Polisario later declared an end to the ceasefire; this led to occasional clashes between the two. The Guerguerat clashes had led to Morocco launching a military operation in Guerguerat, Western Sahara. Germany's request for consultations has led to Rabat suspending diplomatic ties in retaliation.

### Military

Morocco's military consists of the Royal Armed Forces—this includes the Army (the largest branch), the Navy, the Air Force, the Royal Guard, the Royal Gendarmerie and the Auxiliary Forces. Internal security is generally effective, and acts of political violence are rare (with one exception, the 2003 Casablanca bombings which killed 45 people).
The UN maintains a small observer force in Western Sahara, where a large number of Moroccan troops are stationed. The Sahrawi Polisario Front maintains an active militia of an estimated 5,000 fighters in Western Sahara and has engaged in intermittent warfare with Moroccan forces since the 1970s.

### Human rights

During the early 1960s to the late 1980s, under the leadership of Hassan II, Morocco had one of the worst human rights records in both Africa and the world. Government repression of political dissent was widespread during Hassan II's leadership, until it dropped sharply in the mid-1990s. The decades during which abuses were committed are referred to as the Years of Lead (les années de plomb), and included forced disappearances, assassinations of government opponents and protesters, and secret internment camps such as Tazmamart. To examine abuses committed during the reign of King Hassan II (1961–1999), the government under King Mohammed set up an Equity and Reconciliation Commission (IER).
According to a Human Rights Watch annual report in 2016, Moroccan authorities restricted the rights to peaceful expression, association and assembly through several laws. The authorities continue to prosecute both printed and online media which criticises the government or the king (or the royal family). There are also persistent allegations of violence against both Sahrawi pro-independence and pro-Polisario demonstrators in Western Sahara; a disputed territory which is occupied by and considered by Morocco as part of its Southern Provinces. Morocco has been accused of detaining Sahrawi pro-independence activists as prisoners of conscience.
Homosexual acts as well as pre-marital sex are illegal in Morocco, and can be punishable by six months to three years of imprisonment. It is illegal to proselytise for any religion other than Islam (article 220 of the Moroccan Penal Code), and that crime is punishable by a maximum of 15 years of imprisonment. Violence against women and sexual harassment have been criminalised. The penalty can be from one month to five years, with fines ranging from $200 to $1,000. It is also a criminal offence in Morocco to undermine the monarchy; in August 2023, a Moroccan resident of Qatar was sentenced to five years' imprisonment for criticising the King's policy decisions on Facebook.

## Economy

Morocco's economy is considered a relatively liberal economy governed by the law of supply and demand. Since 1993, the country has followed a policy of privatisation of certain economic sectors which used to be in the hands of the government. Morocco has become a major player in African economic affairs, and is the sixth largest economy in Africa by GDP (PPP). Morocco was ranked as the first African country by the Economist Intelligence Unit's quality-of-life index, ahead of South Africa. However, in the years since that first-place ranking was given, Morocco has slipped into fourth place behind Egypt.
Government reforms and steady yearly growth in the region of 4–5% from 2000 to 2007, including 4.9% year-on-year growth in 2003–2007 helped the Moroccan economy to become much more robust compared to a few years earlier. For 2012, the World Bank forecast a rate of 4% growth for Morocco and 4.2% for following year, 2013. Between 2000 and 2019, the share of Moroccan workers in agriculture declined, while those that are in industry increased.

### Tourism

Tourism is one of the most important sectors in the Moroccan economy. It is a strong tourist industry focused on the country's coast, culture, and history. In 2022, tourism in Morocco had surpassed the average number of visitors in the 2010s, while setting an all-time high in 2023 with 14.5 million international tourist arrivals and MAD 104.7 billion in receipts. In 2010, the government launched its Vision 2020, which plans to make Morocco one of the top 20 tourist destinations in the world and to double the annual number of international arrivals to 20 million by 2020. In November 2024, Morocco had nearly 16 million tourists visiting that contributed to 7% of its GDP.
Tourism is increasingly focused on Morocco's culture, such as its ancient cities. The modern tourist industry capitalises on Morocco's ancient and Islamic sites and on its landscape and cultural history. 60% of Morocco's tourists visit for its culture and heritage. Agadir is a major coastal resort and has a third of all Moroccan bed nights. It is a base for tours to the Atlas Mountains. Other resorts in northern Morocco are also very popular.
Large government sponsored marketing campaigns to attract tourists advertised Morocco as an inexpensive and exotic, yet safe, place for tourists. Most of the visitors to Morocco continue to be European, with French nationals making up almost 20% of all visitors. Most Europeans visit between April and August. Casablanca is the major cruise port in Morocco, and has a developed market for tourists in Morocco. The Majorelle botanical garden in Marrakech is a popular tourist attraction. It was bought by the fashion designer Yves Saint-Laurent and Pierre Bergé in 1980. As of 2006, activity and adventure tourism in the Atlas and Rif Mountains are the fastest growth area in Moroccan tourism. These locations have walking and trekking opportunities from late March to mid-November. The government is investing in trekking circuits. They are also developing desert tourism in competition with Tunisia.

### Agriculture

Agriculture in Morocco employs about 40% of the nation's workforce. Thus, it is the largest employer in the country. In the rainy sections of the northwest, barley, wheat, and other cereals can be raised without irrigation. On the Atlantic coast, where there are extensive plains, olives, citrus fruits, and wine grapes are grown, largely with water supplied by artesian wells. Livestock are raised and forests yield cork, cabinet wood, and building materials. Part of the maritime population fishes for its livelihood. Agadir, Essaouira, El Jadida, and Larache are among the important fishing harbors. Both the agriculture and fishing industries are expected to be severely impacted by climate change.
Moroccan agricultural production also consists of oranges, tomatoes, potatoes, olives, and olive oil. High quality agricultural products are usually exported to Europe. Morocco produces enough food for domestic consumption except for grains, sugar, coffee and tea. More than 40% of Morocco's consumption of grains and flour is imported from the United States and France.

### Infrastructure

According to the Global Competitiveness Report of 2019, Morocco Ranked 32nd in the world in terms of Roads, 16th in Sea, 45th in Air and 64th in Railways. This gives Morocco the best infrastructure rankings in the African continent. To meet the growing domestic demand, the Moroccan government invested more than $15 billion from 2010 to 2015 in upgrading its basic infrastructure. Morocco also has the largest port in Africa and the Mediterranean, Tanger-Med, which is ranked the 18th in the world with a handling capacity of over 9 million containers. It is situated in the Tangier free economic zone and serves as a logistics hub for Africa and the world.
In 2014, Morocco began the construction of the first high-speed railway system in Africa linking the cities of Tangier and Casablanca. It was inaugurated in 2018 by the King following over a decade of planning and construction by Moroccan national railway company Office National des Chemins de Fer (ONCF). It is the first phase of what is planned to eventually be a 1,500 kilometeres (930 mi) high-speed rail network in Morocco. An extension of the line to Marrakesh is already being planned. The Moroccan Ministry of Equipment, Transport and Logistics aims to build an additional 3,380 kilometers of expressway and 2,100 kilometers of highway by 2030 with SNCF; the project came at an expected cost of US$9.6 billion. The project also involved purchasing 18 high-speed trains and 150 multi-service trains.

### Energy

In 2008, about 56% of Morocco's electricity supply was provided by coal. However, as forecasts indicate that energy requirements in Morocco will rise 6% per year between 2012 and 2050, a new law passed encouraging Moroccans to look for ways to diversify the energy supply, including more renewable resources. The Moroccan government has launched a project to build a solar thermal energy power plant and is also looking into the use of natural gas as a potential source of revenue for Morocco's government.
Morocco has embarked upon the construction of large solar energy farms to lessen dependence on fossil fuels, and to eventually export electricity to Europe. On 17 April 2022, Rabat-Moroccan agency for solar energy (Masen) and the ministry of energy transition and sustainable development announced the launch of phase one of the mega project Nor II solar energy plant which is a multi-site solar energy project with a total capacity set at 400 megawatts (MN).

### Narcotics

Since the 7th century, cannabis has been cultivated in the Rif region. In 2004, according to the UN World Drugs Report, cultivation and transformation of cannabis represents 0.57% of the national GDP of Morocco in 2002. According to a French Ministry of the Interior 2006 report, 80% of the cannabis resin (hashish) consumed in Europe comes from the Rif region in Morocco, which is mostly mountainous terrain in the north of Morocco, also hosting plains that are very fertile and expanding from Melwiyya River and Ras Kebdana in the East to Tangier and Cape Spartel in the West. Also, the region extends from the Mediterranean in the south, home of the Wergha River, to the north. In addition to that, Morocco is a transit point for cocaine from South America destined for Western Europe.

### Water supply and sanitation

Water supply and sanitation in Morocco are provided by a wide array of utilities. They range from private companies in the largest city—Casablanca, Rabat, and two other cities—to public municipal utilities in 13 other cities, as well as a national electricity and water company. Morocco's Office National de l’Eau Potable (ONEP) is in charge of bulk water supply in about 500 towns. According to a study by the National Liquid Sanitation Master Plan (SNDAL) that started in 1994, only 15 of their 63 treatment plants are operational, and out of approximately 500 million cubic meters of wastewater generated annually, 95% is discharged untreated into natural water bodies.
There have been substantial improvements in access to water supply, and to a lesser extent to sanitation, over the past fifteen years. Remaining challenges include a low level of wastewater treatment (only 13% of collected wastewater is being treated), lack of house connections in the poorest urban neighbourhoods and limited sustainability of rural systems (20% of rural systems are estimated not to function). In 2005, a National Sanitation Programme was approved that aims at treating 60% of collected wastewater and connecting 80% of urban households to sewers by 2020. The issue of lack of water connections for some of the urban poor is being addressed as part of the National Human Development Initiative, under which residents of informal settlements have received land titles and have fees waived that are normally paid to utilities in order to connect to the water and sewer network. An investment programme of about MAD 15 billion was made to cover the centres managed by ONEP from 2003–2017. Japanese and Canadian cooperators and AFESD have also financed several projects for ONEP.
Though, between 1960 and 2020, the per capita availability of renewable water resources went from 2,560 m$^3$ to about 620 m$^3$ per person annually. The World Bank has reported that they have supported the Noor Solar Power project in Morocco with US$700 million in financing the project "To address water scarcity and its impacts on agriculture".

### Science and technology

The Moroccan government has been implementing reforms to improve the quality of education and make research more responsive to socio-economic needs. In May 2009, Morocco's prime minister, Abbas El Fassi, announced that investment in science and technology would rise from US$620,000 in 2008 to US$8.5 million (69 million Moroccan dirhams) in 2009 to finance the laboratories construction, training courses for researchers and a scholarship programme for science during a meeting at the National Centre for Scientific and Technical Research. Morocco was ranked 66th in the Global Innovation Index in 2024, an increase in ranking from 2020 at 75th.
The Moroccan Innovation Strategy was launched at the country's first National Innovation Summit in June 2009 by the Ministry of Industry, Commerce, Investment and the Digital Economy. The Moroccan Innovation Strategy fixed the target of producing 1,000 Moroccan patents and creating 200 innovative start-ups by 2014. In 2012, Moroccan inventors applied for 197 patents, up from 152 two years earlier. In 2011, the Ministry of Industry, Commerce and New Technologies created a Moroccan Club of Innovation, in partnership with the Moroccan Office of Industrial and Commercial Property. The idea is to create a network of players in innovation to help them develop innovative projects.
The Ministry of Higher Education and Scientific Research is supporting research in advanced technologies. The Moroccan Phosphate Office (Office chérifien des phosphates) has invested in a project to develop a smart city, King Mohammed VI Green City, around Mohammed VI University located between Casablanca and Marrakesh, at a cost of DH 4.7 billion (circa US$479 million). In 2012, the Hassan II Academy of Sciences and Technologies identified a number of sectors where Morocco has a comparative advantage and skilled human capital, including mining, fisheries, food chemistry and new technologies. It also identified a number of strategic sectors, such as renewable energies, health sectors, the environment and geosciences.
On 20 May 2015, less than a year after its inception, the Higher Council for Education, Training and Scientific Research presented a report to the king offering a Vision for Education in Morocco 2015–2030. The report advocated making education egalitarian and, thus, accessible to the greatest number. The report also recommended developing an integrated national innovation system which would be financed by gradually increasing the share of GDP devoted to research and development (R&D) from 0.73% of GDP in 2010 to '1% in the short term, 1.5% by 2025 and 2% by 2030'. As of 2015, Morocco had three technoparks. Since the first technopark was established in Rabat in 2005, a second has been set up in Casablanca, followed, in 2015, by a third in Tangers. The technoparks host start-ups and small and medium-sized enterprises specialising in information and communication technologies (ICTs), 'green' technologies (namely, environmentally friendly technologies) and cultural industries. According to Office Marocain de la Propriété Industrielle et Commerciale, patent filing in Morocco grew by 167% during the period 2015–2019.
In 2024, Morocco is among the top four most-connected populations of a country to the Internet in Africa by number of population. In 2022, the number of internet users in Morocco reached around 31.6 million. Later, as of January 2024, Morocco had approximately 34.5 million internet users; it has a penetration rate of about 90.7%. Morocco has several Internet-related projects; an example of such is the National Digital Development Strategy 2030. In 2024, as part of another program called the Connected Campus, the American wireless network provider Cambium Networks deployed 18,000 Wi-Fi access points for public universities in Morocco.

## Demographics
### Population

Morocco has a population of around 37,076,584 inhabitants (2021 estimate). Morocco's population was 11.6 million in 1960. In 2024, 49.7% of the population is female, while 50.3% of it is male. According to the 2014 Morocco population census, there were around 84,000 immigrants in the country. Of these foreign-born residents, most were of French origin, followed by individuals mainly from various nations in West Africa and Algeria. There are also a number of foreign residents of Spanish origin. Some of them are descendants of colonial settlers, who primarily work for European multinational companies, while others are married to Moroccans or are retirees. Prior to independence, Morocco was home to half a million Europeans, most of whom were Christians. Also, prior to independence, Morocco was home to 250,000 Spaniards. Morocco's once prominent Jewish minority has decreased significantly since its peak of 265,000 in 1948, declining to around 3,500 in 2022.
Morocco has a large diaspora, most of which is located in France, which has reportedly over one million Moroccans of up to the third generation. There are also large Moroccan communities in Spain (about 700,000 Moroccans), the Netherlands (360,000), and Belgium (300,000). Other large communities can be found in Italy, Canada, the United States and Israel, where Moroccan Jews are thought to constitute the second biggest Jewish ethnic subgroup. Morocco is also the country with the largest Berber population in the world, with estimates typically ranging between 40–60% of the population.

#### Ethnic groups

In Morocco, ethnic identity is deeply intertwined with language and culture, with the population primarily comprising two major groups: Arabs and Berbers. However, the Higher Planning Commission, the country’s state statistics bureau, does not collect data on ethnic demographics, citing the historical difficulty of distinguishing between Arabs and Berbers, even among Berber speakers.
Arabs form the largest and majority ethnic group, making up between 65% and 80% of the Moroccan population. It is estimated that the indigenous Berbers constitute between 30% and 35% of the population. Berbers, who are also known as Amazigh, are typically divided into three main groups with varying dialects who live spread out in rural mountain areas, namely the Rifians in the Rif, the Zayanes in the Middle Atlas, and the Shilha people in the Anti-Atlas. Since the 7th century, the influx of Arab migrants from the Arabian Peninsula has contributed to shaping Morocco’s demographic, cultural, and genetic landscape. Additionally, a considerable portion of the population includes Haratin, Sahrawis, and Gnawa, descendants of West African or mixed-race enslaved peoples, as well as Moriscos, European Muslims expelled from Spain and Portugal in the 17th century.
According to Encyclopædia Britannica, 44% of Moroccans are Arab, 24% are Arabized Berbers, 21% are Berbers and 10% are Mauritanian Moors. Additionally, Minority Rights Group International estimates that around 90,000 Sahrawis reside in internationally recognized Morocco, compared to approximately 190,000 in the disputed Western Sahara.

### Religion

The religious affiliation in the country was estimated by the Pew Forum in 2010 as 99% Muslim, with all remaining groups accounting for less than 1% of the population. Of those affiliated with Islam, virtually all are Sunni Muslims, with Shia Muslims accounting for less than 0.1%. However, nearly 15% of Moroccans nonetheless describe themselves as non religious according to a 2018 survey conducted by the research network Arab Barometer; the same survey saw nearly 100 percent of respondents identify as Muslims. Another 2021 Arab Barometer survey found that 67.8% of Moroccans identified as religious, 29.1% as somewhat religious, and 3.1% as non religious. The 2015 Gallup International poll reported that 93% of Moroccans considered themselves to be religious.
Prior to Morocco's independence in 1956, the country was home to a significant Christian community, numbering over 500,000 Christians, predominantly of Spanish and French ancestry. These Catholic settlers had a historic legacy and a powerful presence. However, following Morocco's independence, many of these Christian settlers left to Spain or France. The predominantly Catholic and Protestant foreign-resident Christian community consists of approximately 40,000 practising members. Most foreign resident Christians reside in the Casablanca, Tangier, Marrakesh and Rabat urban areas. Meanwhile, the Moroccan Association of Human Rights estimates there are 25,000 Christian citizens.
Before the founding of the State of Israel in 1948, there were about 265,000 Jews in the country, which gave Morocco the largest Jewish community in the Muslim world. The most recent estimates put the size of the historic Casablanca Jewish community at about 2,500, and the Rabat and Marrakesh Jewish communities at about 100 members each. The remainder of the Jewish population is dispersed throughout the country. This population is mostly elderly, with a decreasing number of young people. The Baháʼí Faith community, located in urban areas, numbers 350 to 400 persons.

### Languages

Morocco's official languages are Arabic and Berber. The country's distinctive group of Moroccan Arabic dialects is referred to as Darija. Approximately 92.7% of the whole population can speak Arabic. Berber languages are spoken by 24.8% of the population in three dialects (Tarifit spoken by 3.2%, Tashelhit spoken by 14.2% and Central Atlas Tamazight spoken by 7.4%). According to the 2024 census, 99.2%, or almost the entire literate population of Morocco, could read and write in Arabic, whereas 1.5% of the population could read and write in Berber. The census also reported that 80.6% of Moroccans consider Arabic to be their native language, while 18.9% regard any of the various Berber languages as their mother tongue. After Morocco declared independence in 1956, French and Arabic became the main languages of administration and education.
French is widely used in governmental institutions, media, mid-size and large companies, international commerce with French-speaking countries and often in international diplomacy. French is taught as an obligatory language in all schools. According to the 2004 census, 2.19 million Moroccans spoke a foreign language other than French. English, while far behind French in terms of number of speakers, is the first foreign language of choice, since French is obligatory, among educated youth and professionals. In 2010, there were 10,366,000 French-speakers in Morocco, or about 32% of the population.
According to Ethnologue, as of 2016, there are 1,536,590 individuals (or approximately 4.5% of the population) in Morocco who speak Spanish. Spanish is mostly spoken in northern Morocco and the former Spanish Sahara because Spain had previously occupied those areas. Meanwhile, a 2018 study by the Instituto Cervantes found 1.7 million Moroccans who were at least proficient in Spanish, placing Morocco as the country with the most Spanish speakers outside the Hispanophone world (unless the United States is also excluded from Spanish-speaking countries). A significant portion of northern Morocco receives Spanish media, television signal and radio airwaves, which reportedly facilitate competence in the language in the region.

### Education

Literate population of Morocco (2024) :
| | | percent | percent |
| Can read and write in Arabic | Can read and write in Arabic | 99.2% | 99.2% |
| Can read and write in French | Can read and write in French | 57.7% | 57.7% |
| Can read and write in English | Can read and write in English | 20.5% | 20.5% |
| Can read and write in Berber languages | Can read and write in Berber languages | 1.5% | 1.5% |
Education in Morocco is free and compulsory through primary school. The estimated literacy rate for the country in 2012 was 72%. In September 2006, UNESCO awarded Morocco, amongst other countries such as Cuba, Pakistan, India and Turkey, the "UNESCO 2006 Literacy Prize".
Morocco has more than four dozen universities, institutes of higher learning and polytechnics dispersed at urban centres throughout the country. Its leading institutions include Mohammed V University in Rabat, the country's largest university, with branches in Casablanca and Fès; the Hassan II Agriculture and Veterinary Institute in Rabat, which conducts leading social science research in addition to its agricultural specialties; and Al-Akhawayn University in Ifrane, the first English-language university in Northwest Africa, inaugurated in 1995 with contributions from Saudi Arabia and the United States.
The al-Qarawiyin University, founded by Fatima al-Fihri in the city of Fez in 859 as a madrasa, is considered by some sources, including UNESCO, to be the "oldest university of the world". Morocco has also some of prestigious postgraduate schools, including: Mohammed VI Polytechnic University, l'Institut national des postes et télécommunications [fr; ar], École Nationale Supérieure d'Électricité et de Mecanique (ENSEM), EMI, ISCAE, INSEA, National School of Mineral Industry, École Hassania des Travaux Publics, Les Écoles nationales de commerce et de gestion and École supérieure de technologie de Casablanca.

### Health

Many efforts are made by countries around the world to address health issues and eradicate disease, Morocco included. Morocco is a developing country that has made many strides to improve these categories. According to research published, in 2005, only 16% of citizens in Morocco had health insurance or coverage. In data from the World Bank, Morocco experiences high infant mortality rates at 20 deaths per 1,000 births (2017) and high maternal mortality rates at 121 deaths per 100,000 births (2015).
The government of Morocco sets up surveillance systems within the already existing healthcare system to monitor and collect data. Mass education in hygiene is implemented in primary education schools which are free for residents of Morocco. In 2005, the government of Morocco approved two reforms to expand health insurance coverage. The first reform was a mandatory health insurance plan for public and private sector employees to expand coverage from 16 percent of the population to 30 percent. The second reform created a fund to cover services for the poor. Both reforms improved access to high-quality care. Infant mortality has improved significantly since 1960 when there were 144 deaths per 1,000 live births, in 2000, 42 per 1,000 live births, and it is 15 per 1,000 live births in 2022. The country's under-five mortality rate dropped by 60% between 1990 and 2011.
According to data from the World Bank, the present mortality rate is still very high, over seven times higher than in neighbouring country Spain. In 2014, Morocco adopted a national plan to increase progress on maternal and child health. The Moroccan Plan was started by the Moroccan Minister of Health, El Houssaine Louardi and Ala Alwan, WHO Regional Director for the Eastern Mediterranean Region, on 13 November 2013 in Rabat. Morocco has made significant progress in reducing deaths among both children and mothers. Based on World Bank data, the nation's maternal mortality ratio fell by 67% between 1990 and 2010.
In 2014, spending on healthcare accounted for 5.9% of the country's GDP. Since 2014, spending on healthcare as part of the GDP has decreased. However, health expenditure per capita (PPP) has steadily increased since 2000. In 2015, the Moroccan health expenditure was $435.29 per capita. In 2016, the life expectancy at birth was 74.3, or 73.3 for men and 75.4 for women, and there were 6.3 physicians and 8.9 nurses and midwives per 10,000 inhabitants. In 2024, according to the World Factbook, life expectancy for Morocco is 74.2 years.

## Culture

Morocco is a country with a rich culture and civilisation. Through Moroccan history, it has hosted many people. Culturally speaking, Morocco has combined its Arabic, Berber and Jewish cultural heritage with external influences such as the French and the Spanish and, during the last decades, the Anglo-American lifestyles. Since independence, painting and sculpture, music, amateur theatre and filmmaking have developed. The Moroccan National Theatre (founded 1956) offers regular productions of Moroccan and French dramatic works. Art and music festivals take place throughout the country during the summer months, among them the World Sacred Music Festival at Fès.

### Architecture

Moroccan architecture reflects Morocco's diverse geography and long history, marked by successive waves of settlers through both migration and military conquest. This architectural heritage includes ancient Roman sites, historic Islamic architecture, local vernacular architecture, 20th-century French colonial architecture, and modern architecture.
Much of Morocco's traditional architecture is marked by the style that developed during the Islamic period, from the 7th century onward. This architecture was part of a wider tradition of "Moorish" or western Islamic architecture, which characterized both the Maghreb (Morocco, Algeria, and Tunisia) and al-Andalus (Muslim Spain and Portugal). It blended influences from Amazigh (Berber) culture in North Africa, pre-Islamic Spain (Roman, Byzantine, and Visigothic), and contemporary artistic currents in the Islamic Middle East to elaborate a unique style over centuries with recognizable features such as the horseshoe arch, riad gardens, and elaborate geometric and arabesque motifs in wood, carved stucco, and zellij tilework.
Although Moroccan Amazigh architecture is not strictly separate from the rest of Moroccan architecture, many structures and architectural styles are distinctively associated with traditionally Amazigh or Amazigh-dominated regions such as the Atlas Mountains and the Sahara and pre-Sahara regions. These mostly rural regions are marked by numerous kasbahs (fortresses) and ksour (fortified villages) shaped by local geography and social structures, of which one of the most famous is Ait Benhaddou. They are typically made of rammed earth and decorated with local geometric motifs. Far from being isolated from other historical artistic currents around them, the Amazigh peoples of Morocco (and across North Africa) adapted the forms and ideas of Islamic architecture to their own conditions and in turn contributed to the formation of Western Islamic art, particularly during their political domination of the region over the centuries of Almoravid, Almohad, and Marinid rule.

### Literature

Moroccan literature is written mostly in Arabic, Berber, Hebrew and French. Particularly under the Almoravid and Almohad empires, Moroccan literature was closely related to the literature of al-Andalus, and shared important poetic and literary forms such as zajal, the muwashshah and the maqama. Islamic literature, such as Quranic exegeses and other religious works such as Qadi Ayyad's Al-Shifa, were influential. The University of al-Qarawiyyin in Fes was an important literary centre attracting scholars from abroad, including Maimonides, Ibn al-Khatib, and Ibn Khaldun.
Under the Almohad dynasty Morocco experienced a period of prosperity and brilliance of learning. The Almohad built the Kutubiyya Mosque in Marrakesh, which accommodated no fewer than 25,000 people, but was also famed for its books, manuscripts, libraries and book shops, which gave it its name; the first book bazaar in history. The Almohad Caliph Abu Yakub had a great love for collecting books. He founded a great library, which was eventually carried to the Casbah and turned into a public library.
Modern Moroccan literature began in the 1930s. Two main factors gave Morocco a pulse toward witnessing the birth of modern literature. Morocco, as a French and Spanish protectorate left Moroccan intellectuals the opportunity to exchange and to produce literary works freely with the contact of other Arabic literature and Europe. Three generations of writers especially shaped 20th century Moroccan literature. The first was the generation that lived and wrote during the Protectorate (1912–1956), its most important representative being Mohammed Ben Brahim (1897–1955). The second generation played an important role in the transition to independence, with writers like Abdelkrim Ghallab (1919–2006), Allal al-Fassi (1910–1974) and Mohammed al-Mokhtar Soussi (1900–1963). The third generation is that of writers of the sixties. Moroccan literature had writers such as Mohamed Choukri, Driss Chraïbi, Mohamed Zafzaf and Driss El Khouri.
During the 1950s and 1960s, Morocco was a refuge and artistic centre and attracted writers as Paul Bowles, Tennessee Williams and William S. Burroughs. Moroccan literature flourished with novelists such as Mohamed Zafzaf and Mohamed Choukri, who wrote in Arabic, and Driss Chraïbi and Tahar Ben Jelloun who wrote in French. Other important Moroccan authors include: Abdellatif Laabi, Abdelkrim Ghallab, Fouad Laroui, Mohammed Berrada and Leila Abouzeid. Orature (oral literature) is also an integral part of Moroccan culture, be it in Moroccan Arabic or Berber.

### Music

Moroccan music is of Arabic, Berber and sub-Saharan origins. Rock-influenced chaabi bands are widespread, as is trance music with historical origins in Islamic music. Amazigh people have also played music using a lotar, a type of lute from the Rwais tribe in the High Atlas mountains. The lotar is usually played by a duo, which may also include a rebab. The Berber music is usually monodic with a pentatonic scale system. Malḥūn poetry in oral form is also accompanied by traditional instruments, such as lutes, violins, rebabs and small drums.
Aita is a Bedouin musical style sung in the countryside. Chaabi ("popular") is music consisting of numerous varieties that are descended from the multifarious forms of Moroccan folk music. Chaabi was originally performed in markets, but is now found at any celebration or meeting. Morocco is also home to Andalusian classical music that is found throughout Northwest Africa. It probably evolved under the Moors in Cordoba, and the Persian-born musician Ziryab is usually credited with its invention. A genre known as Contemporary Andalusian music is the brainchild of Morisco visual artist, composer and oudist Tarik Banzi, founder of the Al-Andalus Ensemble. Artists like Nass El Ghiwane and Jil Jilala mix traditional styles with modern influences. Popular Western forms of music are also becoming increasingly popular in Morocco, such as fusion, rock, country, metal and, in particular, hip hop. Arabic pop artists such as Hatim Ammor and ElGrandeToto are well-known.

### Media

Cinema in Morocco has a long history, stretching back over a century to the filming of Le chevrier Marocain ("The Moroccan Goatherd") by Louis Lumière in 1897. Between that time and 1944, many foreign movies were shot in the country, especially in the Ouarzazate area. In 1944, the Moroccan Cinematographic Centre [fr] (CCM), the nation's film regulatory agency, was established. Studios were also opened in Rabat.
In 1952, Orson Welles' Othello won the Palme d'Or at the Cannes Film Festival under the Moroccan flag. However, the Festival's musicians did not play the Moroccan national anthem, as no one in attendance knew what it was. Six years later, Mohammed Ousfour would create the first Moroccan movie, Le fils maudit ("The Damned Son"). In 1968, the first Mediterranean Film Festival was held in Tangier. In its current incarnation, the event is held in Tetouan. This was followed in 1982 with the first national festival of cinema, which was held in Rabat. In 2001, the first International Film Festival of Marrakech (FIFM) was held in Marrakech. Some of Moroccan television channels include 2M, Al Aoula (Societe Nationale de Radiodiffusion et de Television) and Medi 1 TV.

### Cuisine

Moroccan cuisine is considered one of the most diversified cuisines in the world. This is a result of the centuries-long interaction of Morocco with the outside world. The cuisine of Morocco is mainly a fusion of Moorish, European and Mediterranean cuisines. Spices are used extensively in Moroccan cuisine. While spices have been imported to Morocco for thousands of years, many ingredients such as saffron from Tiliouine, mint and olives from Meknes, and oranges and lemons from Fez, are home-grown.
Chicken is the most widely eaten meat in Morocco. The most commonly eaten red meat in Morocco is beef; lamb is preferred but is relatively expensive. The main Moroccan dish most people are familiar with is couscous, the old national delicacy. Beef is the most commonly eaten red meat in Morocco, usually eaten in a tagine with vegetables or legumes. Chicken is also very commonly used in tagines; one of the most famous tagine is the tagine of chicken, potatoes and olives. Lamb is also consumed, but as Northwest African sheep breeds store most of their fat in their tails, Moroccan lamb does not have the pungent flavour that Western lamb and mutton have. Poultry is also very common, and the use of seafood is increasing in Moroccan food. In addition, there are dried salted meats and salted preserved meats such as kliia/khlia and "g'did" which are used to flavor tagines or used in "el ghraif", a folded savory Moroccan pancake.
Among the most famous Moroccan dishes are Couscous, Pastilla (also spelled Bsteeya or Bestilla), Tajine, Tanjia and Harira. Although the latter is a soup, it is considered a dish in itself and is served as such or with dates especially during the month of Ramadan. Pork consumption is forbidden in accordance with Sharia, religious laws of Islam.
A big part of the daily meal is bread. Bread in Morocco is principally from durum wheat semolina known as khobz. Bakeries are very common throughout Morocco and fresh bread is a staple in every city, town and village. The most common is whole grain coarse ground or white flour bread. There are also a number of flat breads and pulled unleavened pan-fried breads. The most popular drink is "atai", green tea with mint leaves and other ingredients.

### Sport

Football is the country's most popular sport, popular among the urban youth in particular. In 1986, Morocco became the first Arab and African country to qualify for the second round of the FIFA World Cup. Morocco hosted the Africa Cup of Nations in 1988 and will host it again in 2025 after original host Guinea was stripped from hosting rights due to inadequacy of hosting preparations. Morocco was originally scheduled to host the 2015 Africa Cup of Nations, but refused to host the tournament on the scheduled dates because of fears over the Ebola outbreak on the continent. Morocco made six attempts to host the FIFA World Cup but lost five times to the United States, France, Germany, South Africa and a Canada–Mexico–United States joint bid, however Morocco will co-host it in 2030 along with Portugal and Spain having finally won the bid in their sixth attempt. In 2022, Morocco became the first African and Arab team to reach the semifinals and finished 4th in the tournament.
At the 1984 Olympic Games, two Moroccans won gold medals in track and field. Nawal El Moutawakel won in the 400 metres hurdles; she was the first woman from an Arab or Islamic country to win an Olympic gold medal. Saïd Aouita won the 5000 metres at the same games. Hicham El Guerrouj won gold medals for Morocco at the 2004 Summer Olympics in the 1500 metres and 5000 metres and holds several world records in the mile run.
Spectator sports in Morocco traditionally centred on the art of horsemanship until European sports—football, polo, swimming and tennis—were introduced at the end of the 19th century. Tennis and golf have become popular. Several Moroccan professional players have competed in international competition, and the country fielded its first Davis Cup team in 1999. Morocco established one of Africa's first competitive leagues in basketball. Rugby came to Morocco in the early 20th century, mainly by the French who occupied the country. As a result, Moroccan rugby was tied to the fortunes of France, during the first and second World War, with many Moroccan players going away to fight. Like many other Maghreb nations, Moroccan rugby tended to look to Europe for inspiration, rather than to the rest of Africa. Kickboxing is also popular in Morocco. The Moroccan-Dutch Badr Hari, heavyweight kickboxer and martial artist, is a former K-1 heavyweight champion and K-1 World Grand Prix 2008 and 2009 finalist.