Kingdom of Morocco, or simply known as Morocco (Arabic: المملكة المغربية‎‎ "al-Mamlakah al-Maghribiyah", lit. "The Western Kingdom"; Berber: ⵜⴰⴳⵍⴷⵉⵜ ⵏ ⵍⵎⴰⵖⵔⵉⴱ"Tageldit n Lmaɣrib"), is a sovereign country in the Maghreb region of North Africa. Geographically, Morocco is characterized by a rugged mountainous interior, large tracts of desert, and a lengthy coastline along the Atlantic Ocean and Mediterranean Sea.
Morocco has a population of over 33.8 million and an area of 446,550 km(172,410 sq mi). Its capital is Rabat, and the largest city is Casablanca. Other major cities include Marrakesh, Tangier, Tetouan, Salé, Fes, Agadir, Meknes, Oujda, Kenitra, and Nador. A historically prominent regional power, Morocco has a history of independence not shared by its neighbours. Since the foundation of the first Moroccan state by Idris I in 789, the country has been ruled by a series of independent dynasties, reaching its zenith under the Almoravid and Almohad dynasty, spanning parts of Iberia and Northwestern Africa. Marinid and Saadidynasties continued the struggle against foreign domination, and Morocco remained the only North African country to avoid Ottoman occupation. The Alaouite dynasty, the current ruling dynasty, seized power in 1666. In 1912 Morocco was divided into French and Spanish protectorates, with an international zone in Tangier, and regained its independence in 1956. Moroccan culture is a blend of Arab, indigenous Berber, Sub-Saharan African, and European influences.
Morocco claims the non-self-governing territory of Western Sahara as its Southern Provinces. Morocco liberated the territory in 1975, leading to a guerrilla war with the Polisario Front until a cease-fire in 1991. Peace processes have thus far failed to break the political deadlock.
Morocco is a constitutional monarchy with an elected parliament. The King of Morocco holds vast executive and legislative powers, especially over the military, foreign policy and religious affairs. Executive power is exercised by the government, while legislative power is vested in both the government and the two chambers of parliament, the Assembly of Representatives and the Assembly of Councillors. The king can issue decrees called dahirs which have the force of law. He can also dissolve the parliament after consulting the Prime Minister and the president of the Constitutional court.
Morocco's predominant religion is Islam, and the official languages are Arabic and Tamazight. The Moroccan dialect, referred to as "Darija", and French are also widely spoken. Morocco is a member of the Arab League, the Union for the Mediterranean, and the African Union. It has the fifth largest economy of Africa.
The Berber Roman client King Ptolemy of Mauretania.
The area of present-day Morocco has been inhabited since Paleolithic times, sometime between 190,000 and 90,000 BC. During the Upper Paleolithic, the Maghreb was more fertile than it is today, resembling a savanna more than today's arid landscape. Twenty-two thousand years ago, the Aterian was succeeded by the Iberomaurusian culture, which shared similarities with Iberian cultures. Skeletal similarities have been suggested between the Iberomaurusian "Mechta-Afalou" burials and European Cro-Magnon remains. The Iberomaurusian was succeeded by the Beaker culture in Morocco.
Mitochondrial DNA studies have discovered a close link between Berbers and the Saami of Scandinavia. This supports theories that the Franco-Cantabrian refuge area of southwestern Europe was the source of late-glacial expansions of hunter-gatherers who repopulated northern Europe after the last ice age.
North Africa and Morocco were slowly drawn into the wider emerging Mediterranean world by the Phoenicians, who established trading colonies and settlements in the early Classical period. Substantial Phoenician settlements were at Chellah, Lixus and Mogador.Mogador was a Phoenician colony as early as the early 6th century BC.
Ancient Roman ruins of Volubilis.
Morocco later became a realm of the North African civilisation of ancient Carthage as part of its 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 present state of Mauritania) dates at least to 225 BC.
Mauretania became a client kingdom of the Roman Empire in 33 BC. Emperor Claudius annexed Mauretania directly as a Roman province in 44 AD, under an imperial governor (either a"procurator Augusti", or a "legatus Augusti pro praetore").
During the crisis of the 3rd century, parts of Mauretania were reconquered by Berber tribes. Direct Roman rule became confined to a few coastal cities (such as Septum (Ceuta) in Mauretania Tingitana and Cherchell in Mauretania Caesariensis) by the late 3rd century.
The Muslim conquest of the Maghreb, that started in the middle of the 7th century, was achieved early into the following 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.
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 Rashidun 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.
According to medieval legend, Idris ibn Abdallah had fled to Morocco after the Abbasids massacre of his tribe in Iraq. He convinced the Awraba Berber tribes to break their allegiance to the distant Abbasid caliphs in Baghdad 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 Idrissids 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.
The Almohad realm at its greatest extent, c. 1212
From the 11th century onwards, a series of powerful Berber dynasties arose. Under the Almoravid dynasty  and the Almohad dynasty, Morocco dominated the Maghreb, much of present-day Spain and Portugal, and the western Mediterranean region. From the 13th century onwards the country saw a massive migration of Banu Hilal Arab tribes. In the 13th and 14th centuries the Merinids held power in Morocco and strove to replicate the successes of the Almohads by military campaigns in Algeria and Spain. They were followed by the Wattasids. In the 15th century, the Reconquista ended Muslim rule in central and southern Spain 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.
On another note and according to Elizabeth Allo Isichei, "In 1520, there was a famine in Morocco so terrible that for a long time other events were dated by it. It has been suggested that the population of Morocco fell from 5 to under 3 million between the early sixteenth and nineteenth centuries."
Morocco, Safi ceramic vessel Jobbana
Former Portuguese fortress of Mazagan in El Jadida
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 Alaouite Dynasty, who remained in power since the 17th century.