rivation. Morocco also has a high level of economic inequality. The unemployment rates under the highly educated as well as the unskilled are very high and cause consistent social unrest in many cities and villages. In 2011, the UN's Human Development Index ranked Morocco as the 130th most developed country in the world.
Almost all Moroccans speak either Berber, Moroccan Arabic or French as mother tongues. Hassaniya Arabic, sometimes considered as a variety of Moroccan Arabic, is spoken in the southern provinces (Western Sahara) in the country by a small population.
The full Arabic name al-Mamlakat al-Maghribiyyah (المملكة المغربية) translates to "The Western Kingdom". Al-Maghrib (المغرب), meaning "The West", is commonly used. For historical references, medieval Arab historians and geographers used to refer to Morocco as al-Maghrib al-Aqṣá (المغرب الأقصى, "The Farthest West"), disambiguating it from neighboring historical regions called al-Maghrib al-Awsaṭ (المغرب الأوسط, "The Middle West", Algeria) and al-Maghrib al-Adná (المغرب الأدنى, "The Nearest West", Tunisia).
The English name "Morocco" originates from Spanish "Marruecos" or the Portuguese "Marrocos", from medieval Latin "Morroch", which referred to the name of the former Almoravid and Almohad capital, Marrakesh. In Persian and Urdu, Morocco is still called "Marrakesh". Until recent decades, Morocco was called "Marrakesh" in Middle Eastern Arabic. In Turkish, Morocco is called "Fas" which comes from the ancient Idrisid and Marinid capital, Fez.
The word "Marrakesh" is made of the Berber word combination Mour N Akoush (Mur N Akuc), meaning Land of God.
The earliest well-known Moroccan independent state was the Berber kingdom of Mauretania under king Bocchus I. This Berber Kingdom of Mauretania (current northern Morocco) dates at least to 110 BC. The region remained a part of the Roman Empire until 429 AD when invading Vandals overran the area and Roman administrative presence came to an end.
Umayyad Muslims conquered the region in the 7th century, bringing their language, their system of government, and Islam, to which many of the Berbers slowly converted, mostly after the Arab rule receded. In the Islamic era the first Moroccan Muslim state, independent from the Abbasid Empire, was The Kingdom of Nekor, an emirate in the Rif area. It was founded by Salih I ibn Mansur in 710 AD, as a client state to the Rashidun Caliphate. According to medieval legend, Idris I fled to Morocco from the Abbasids' massacre against his tribe in Iraq and managed to convince the Awraba Berber tribes to break allegiance to the distant Abbasid caliphs in Baghdad. He founded the Idrisid Dynasty in 780 AD. Morocco became later a center of learning and a major power. From the 11th century onwards, a series of powerful Berber dynasties arose. Under the Almoravid dynasty and the Almohad dynasty, Morocco dominated the Maghreb, Muslim-conquered Spain, and the western Mediterranean region. In the 13th century the Merinids gained power over Morocco and strove to replicate the successes of the Almohads. In the 15th century the Reconquista ended Islamic rule in central and southern Iberia (modern day Spain + Portugal) and many Muslims and Jews fled to Morocco. Under the Saadi Dynasty, the first Moroccan dynasty initiated by ethnic Arabs since the Idrisids, the country would consolidate power and fight off Portuguese and Ottoman invaders, as in the battle of Ksar el Kebir. The reign of Ahmad al-Mansur brought new wealth and prestige to the Sultanate, and a massive invasion of the Songhay Empire was initiated.
However, managing the territories across the Sahara proved too difficult. After the death of al-Mansur the country was divided among his sons. In 1666 the sultanate was reunited by the Alaouite dynasty, who have since been the ruling house in Morocco. The organization of the state developed with Ismail Ibn Sharif. With his Jaysh d'Ahl al-Rif (the Riffian Army) he seized Tangier from the English in 1684 and drove the Spanish from Larache in 1689.
In 1912, after the First Moroccan Crisis and the Ag