History

Twelve Dynasties

One thousand two hundred years of power, in order

History9 min

Morocco is the oldest continuous state in the Arab world. While empires rose and collapsed across the Middle East, while the Ottoman Turks swallowed everything from Algeria to Iraq, Morocco remained independent — ruled by a succession of dynasties that fought each other, replaced each other, and built on top of each other for twelve hundred years.

The Ottomans never took Morocco. Neither did the Mongols. The French and Spanish managed it for forty-four years. The dynasty that rules today has been in power since 1660 — longer than any royal house in Europe.

Here are the twelve, in order.

1. The Idrisids (788–974)

Idris I was a descendant of the Prophet Muhammad who fled the Abbasid massacre in the east and arrived in Morocco in 788. Amazigh tribes near Volubilis proclaimed him king. He was poisoned by an Abbasid agent three years later — but his son, Idris II, founded Fes in 809 and made it the capital. The Idrisids were the first dynasty to unite Morocco as a single state. They were also the first to establish the principle that would define Moroccan politics for the next millennium: the ruler must be a sharif — a descendant of the Prophet.

2. The Almoravids (1040–1147)

Sanhaja Berbers from the western Sahara — veiled warriors who had been living in ribats (fortified monasteries) on the edge of the desert. Under Yusuf ibn Tashfin, they swept north, united Morocco, founded Marrakech in 1062, and crossed the Strait to save Muslim Spain from the Christian Reconquista. Their empire stretched from Senegal to Zaragoza. They built the Almoravid Qubba in Marrakech — the only surviving building from their era — and the underground water channels that still run beneath the city. A desert reform movement that became a continental empire in a single generation.

3. The Almohads (1147–1269)

Masmuda Berbers from the High Atlas who considered the Almoravids insufficiently pious. Led by the religious reformer Ibn Tumart and then the military genius Abd al-Mu'min, they conquered Morocco, Algeria, Tunisia, Libya, and half of Spain. The golden age. They built the Koutoubia Mosque in Marrakech, the Hassan Tower in Rabat, and the Giralda in Seville — three minarets, three cities, one architectural language. They lost Spain at the Battle of Las Navas de Tolosa in 1212, and the empire fractured. But the buildings remain.

4. The Marinids (1269–1465)

Zenata Berbers from the eastern plains who took power as the Almohads collapsed. They moved the capital back to Fes and became the great builders of theological colleges — the Bou Inania, the Al-Attarine, the Seffarine — whose zellige and carved stucco are among the finest in the Islamic world. They failed to reconquer Spain. They sent Ibn Battuta on his travels. They never matched the Almohad territorial reach, but what they built in Fes has not been surpassed. A dynasty with no lineage, compensating with geometry.

5. The Wattasids (1472–1554)

A branch of the Marinid family who took formal control of a weakened, fragmented state. Portugal captured the coastal cities — Ceuta, Tangier, Agadir, Essaouira. Spain took Melilla. The Wattasids could not hold the country together and could not expel the Europeans. They are the dynasty that history remembers for losing. Their only legacy is the vacuum they left.

6. The Saadians (1549–1659)

Arab sharifs from the Draa Valley — the first non-Berber dynasty to rule Morocco. They rallied resistance against the Portuguese, captured Marrakech, then Fes, and unified the country. At the Battle of the Three Kings in 1578, they destroyed a Portuguese invasion force so completely that Portugal lost its king and its independence to Spain.

The victor, Ahmad al-Mansur — the Golden One — built the El Badi Palace in Marrakech with Carrara marble and Sudanese gold. He conquered the Songhai Empire in Mali, controlling the trans-Saharan gold routes. He exchanged ambassadors with Elizabeth I of England. Morocco reached its zenith of wealth and diplomatic reach. The Saadian Tombs — sealed by the next dynasty, rediscovered by the French in 1917 — are the most ornate funerary architecture in the country.

7. The Alaouites (1660–present)

Sharifs from Tafilalet, descended from the Prophet through his grandson Hasan. They have ruled Morocco continuously for over 360 years — the longest-reigning dynasty in the Islamic world. The current king, Mohammed VI, is the twenty-third Alaouite monarch.

The dynasty's defining figure was Moulay Ismail (r. 1672–1727), who built Meknes as his Versailles, maintained a standing army of 150,000 enslaved soldiers, and consolidated Alaouite control through a combination of military force and strategic marriage that makes Game of Thrones look like a village dispute.

The Alaouites survived the French Protectorate (1912–1956) by bending without breaking. Mohammed V became the symbol of independence. Hassan II held the country together through the Years of Lead — decades of political repression that the country is still reckoning with. Mohammed VI, who took the throne in 1999, has modernised the economy, reformed family law, and positioned Morocco as Africa's bridge to Europe.

The pattern

Every Moroccan dynasty follows the same arc. A reformist movement — usually religious, usually from the margins — unites the tribes, takes the cities, and builds. The building phase lasts one to three generations. Then the dynasty softens, fragments, and is replaced by the next wave from the mountains or the desert. The Almoravids came from the Sahara. The Almohads came from the Atlas. The Saadians came from the Draa Valley. The Alaouites came from the oases of the Tafilalet.

The exception is the current dynasty. The Alaouites have lasted because they adapted — absorbing colonial occupation, accepting constitutional monarchy, navigating independence, and holding together a country that contains Amazigh and Arab, Saharan and Mediterranean, rural and urban, traditional and modern. Whether this adaptability will sustain the dynasty through the next century is Morocco's central political question. The twelve dynasties that came before offer one lesson: nothing lasts unless it changes.

The cities they built are still standing. Fes is Idrisid. Marrakech is Almoravid. Rabat is Almohad. Meknes is Alaouite. Each dynasty stamped a city with its name. The buildings they raised are the curriculum. The story of Morocco is written in stone, plaster, zellige, and cedarwood — and in the tombs of the kings who ordered them carved.


Sources

  • Abun-Nasr, Jamil. A History of the Maghrib in the Islamic Period. Cambridge University Press, 1987
  • Terrasse, Henri. Histoire du Maroc. Atlantides, 1949
  • Julien, Charles-André. History of North Africa. Routledge, 1970
  • Pennell, C.R. Morocco Since 1830. NYU Press, 2000