Morocco (المغرب; ; Maroc), officially the Kingdom of Morocco (المملكة المغربية; ; Royaume du Maroc), is a country located in the Maghreb region of North West Africa with an area of 710,850 km2. Its capital is Rabat, the largest city Casablanca. It overlooks the Mediterranean Sea to the north and the Atlantic Ocean to the west. Morocco claims the areas of Ceuta, Melilla and Peñón de Vélez de la Gomera, all of them under Spanish jurisdiction.
Since the foundation of the first Moroccan state by Idris I in 788 AD, the country has been ruled by a series of independent dynasties, reaching its zenith under the Almoravid and Almohad dynasties, spanning parts of Iberia and northwestern Africa. The Marinid and Saadi dynasties continued the struggle against foreign domination, allowing Morocco to remain the only northwest African country to avoid Ottoman occupation. The Alaouite dynasty, which rules to this day, seized power in 1631. In 1912, Morocco was divided into French and Spanish protectorates, with an international zone in Tangier. It regained its independence in 1956, and has since remained comparatively stable and prosperous by regional standards.
Morocco claims the non-self-governing territory of Western Sahara, formerly Spanish Sahara, as its Southern Provinces. After Spain agreed to decolonise the territory to Morocco and Mauritania in 1975, a guerrilla war arose with local forces. Mauritania relinquished its claim in 1979, and the war lasted until a cease-fire in 1991. Morocco currently occupies two thirds of the territory, and peace processes have thus far failed to break the political deadlock.
The unitary sovereign state of 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 its official languages are Arabic and Berber; the latter became an official language in 2011, and was the native language of Morocco before the Muslim conquest in the seventh century C.E. The Moroccan dialect of Arabic, referred to as Darija, and French are also widely spoken. Moroccan culture is a blend of Berber, Arab, Sephardi Jews, West African and European influences.
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 full Arabic name ' (المملكة المغربية) translates to "Kingdom of the West"; although "the West" in Arabic is الغرب '. For historical references, medieval Arab historians and geographers sometimes referred to Morocco as ' (المغرب الأقصى, meaning "The Farthest West") to distinguish it from neighbouring historical regions called ' (المغرب الأوسط, meaning "The Middle West") and (المغرب الأدنى, meaning "The Nearest West").
The basis of Morocco's English name is Marrakesh, its capital under the Almoravid dynasty and Almohad Caliphate. The origin of the name Marrakesh is disputed, but is most likely from the Berber words amur (n) akush (ⴰⵎⵓⵔ ⵏ ⴰⴽⵓⵛ) or "Land of God". The modern Berber name for Marrakesh is Mṛṛakc (in the Berber Latin script). In Turkish, Morocco is known as Fas, a name derived from its ancient capital of Fes. However, this was not the case in other parts of the Islamic world: until the middle of the 20th century, the common name of Morocco in Egyptian and Middle Eastern Arabic literature was Marrakesh (مراكش); this name is still used in some languages such as Persian, Urdu and Punjabi. The English name Morocco is an anglicisation of the Spanish "Marruecos", from which also derives the Tuscan "Morrocco", the origin of the Italian "Marocco".