The Kingdom of Morocco is a country in North Africa with a population of 33,757,175. Morocco has international borders with Algeria to the east, Spain to the north and Mauritania to the south. Morocco is the only African country that is not currently a member of the African Union. it is currently a member of the Arab League, Arab Maghreb Union, the Francophone, Organization of the Islamic Conference, Mediterranean Dialogue group, and Group of 77, and is a major non-NATO ally of the United States. Morocco hosted many people coming from East (Phoenicians, Carthaginians, Jews and Arabs), South (Sub-Saharan Africans) and North (Romans, Vandals, Andalusia’s (including Moors and Jews)).
The history of Morocco spans over twelve centuries, without considering Classical antiquity. The territory corresponding to Morocco was inhabited by Berbers since at least 5000 years ago. The country was first unified by the Idrisid dynasty in 789, half a century after the Berber Revolt, that led to its independence from the Arab Caliphate. Under the Almoravid dynasty and the Almohad dynasty, Morocco dominated the Maghreb and Muslim Spain. The Reconquista ended Almohad rule in Iberia and many Muslims and Jews migrated to Morocco. Under the Saadi dynasty, Morocco 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 an invasion of the Songhai Empire was initiated. However managing the territories across the Sahara proved to be 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 of Morocco. The organization of the state developed with Ismail Ibn Sharif. With his Black Guard he drove the English from Tangier (1684) and the Spanish from Larache (1689). The Alaouite dynasty distinguished itself in the 19th century by maintaining Moroccan independence while other states in the region succumbed to European interests. In 1912, after the First Moroccan Crisis and the Agadir Crisis, the Treaty of Fez was signed, effectively dividing Morocco into a French and Spanish protectorate. In 1956, after 44 years of occupation Morocco regained independence from France as the Kingdom of Morocco.