The History of Morocco spans over 12 centuries, without considering the Classical antiquity. The country was first unified by the Idrisid dynasty in 780, representing the first Islamic state in Africa autonomous from the Arab Empire.

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 Songhay 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. Hassan II became King in 1961. During the 1990s, King Hassan made great strides toward economic and political liberalization. He died on July 23, 1999, and was succeeded by his son, Mohammed VI, who pledged to continue the reforms.

Here are a few significant dates to help you situate towns and monuments in their historical context.

  • 681: Beginning of the Arab conquest of Morocco (introduction of Islam)
  • 788: The Idrisside Dynasty
  • 809: Fez founded by Idriss II
  • 1055: The Almoravide Dynasty
  • 1061 1107: The reign of Youssef ben Tachfine (founder of Marrakesh)
  • 1130: The Almohade Dynasty
  • 1184 1199: The reign of Yacoub el Mansour, who made Rabat his capital (building of the Hassan Tower at Rabat, the Koutoubia in Marrakesh and the Giralda in Seville)
  • 1258: The Merinide Dynasty
  • 1269: 1286: The reign of Abou Youssef Yacoub (building of Fez el Jedid)
  • 1331: 1351: Reign of Abou Hassan (building of the Chellah necropolis at Rabat)
  • 1554: The Saadian Dynasty
  • 1578: The battle of the three kings ending Portuguese rule
  • 1578: 1602: Reign of Ahmed el Mansour (Saadian tombs at Marrakesh)
  • 1664: The Alaouite Dynasty
  • 1672: 1727: The reign of Moulay Ismail, builder of Meknes
  • 1927: Accession to the throne of H.M. Mohammed V
  • 1956: Independence of Morocco
  • 1961: Accession to the throne of H.M. Hassan II
  • 1971: The new Constitution adopted by referendum
  • 1975: The Green March reunified Morocco with its Saharan provinces
  • 1993: Inauguration of the Hassan II Mosque at Casablanca
  • 1999: Accession to the Throne of H.H. Mohammed VI B-Moroccan