Idrisid Dynasty
The first Moroccan state—an Arab Muslim dynasty of Hasanid Alid descent that ruled from 788 to 974 CE, founding the city of Fez and establishing the sharifian tradition in Morocco.
Idrisid Dynasty
The Idrisid dynasty (al-Adārisah) was the first independent Islamic state in Morocco, founded in 788 CE by Idris I ibn Abdallah, a Hasanid sharif who fled Abbasid persecution after the Battle of Fakhkh. Generally regarded by historians as the first Moroccan state, the Idrisids established the sharifian tradition—rule by descendants of the Prophet Muhammad—that would become a defining feature of Moroccan political legitimacy for centuries to come. Under Idris II, the dynasty founded the city of Fez, which grew into the spiritual and intellectual capital of Morocco.
Quick Facts
| Attribute | Value |
|---|---|
| Type | Hasanid Alid Dynasty / Imamate |
| Period | 788–974 CE |
| Region | Northern Morocco (and parts of western Algeria) |
| Capital | Walili (788–808), Fez (808–927), Hajar an-Nasr (927–985) |
| Founder | Idris I ibn Abdallah (Idris I) |
| Dynasty | Idrisid (al-Adārisah) |
| Religion | Islam (Zaydi Shia / Sunni — disputed) |
| Duration | 186 years |
The Founders: Idris I & Idris II
Idris I: The Exiled Sharif (788–791)
Idris I was a great-grandson of Hasan ibn Ali (the grandson of Muhammad) who survived the Abbasid massacre of Alids at the Battle of Fakhkh (786 CE) near Mecca. Fleeing westward across North Africa, he eventually reached Volubilis (Walili), where the Awraba Berbers—a powerful tribe chafing under Abbasid suzerainty—declared him their imam in 788 CE.
Within three years, Idris I had:
- United the Awraba and allied Berber tribes
- Extended his authority over northern Morocco and parts of the Atlantic plain
- Begun minting coins establishing his legitimacy
- Laid the foundations for what would become the city of Fez
The Abbasid Caliph Harun al-Rashid saw Idris’s growing power as a threat. In 791 CE, the caliph dispatched an agent named Sulayman ibn Jarir al-Shammakh who infiltrated Idris’s court, poisoned him, and fled. Idris I died after a reign of only three years—but his posthumous son would carry his legacy forward.
Idris II: The Builder (791–828)
Born months after his father’s assassination, Idris II was raised by the Awraba chieftain Rashid and later by his mother, Kanz al-Awrabiya. In 803 CE, at age 12, he was formally proclaimed imam. Under his rule, the Idrisid state reached its zenith.
Idris II’s greatest achievement was the foundation and expansion of Fez (founded c. 808 CE). He:
- Established Fez as the capital, replacing Volubilis
- Attracted Arab immigrants from al-Andalus (800 families) and Ifriqiya
- Built the first mosques and administrative quarters
- Consolidated control over northern Morocco and parts of western Algeria
- Established the framework for a central government outside the Berber tribal system
By the time of his death in 828 CE, the Idrisid state was the dominant power in northern Morocco, though it never controlled all of the country—the Barghawata, Sijilmasa, and Nekor remained independent.
History
The Division & Fragmentation (828–863)
Upon Idris II’s death, the kingdom was divided among his eight sons, a decision that permanently fractured Idrisid power:
| Son | Territory |
|---|---|
| Muhammad | Fez (senior heir) |
| Isa | Chellah / Sale region |
| Ahmad | Taza / Rif region |
| Umar | Tangier and surrounding areas |
| al-Qasim | Wad Zam / Tadla |
| Ali | Draa Valley |
| Yahya | Northern Morocco (later ruled) |
| Abdullah | Uncertain / minor territory |
Muhammad retained Fez but could not control his brothers. Internecine conflict weakened the dynasty, and local Berber tribes reasserted autonomy.
Restoration & Stability (863–900)
After decades of fragmentation, the dynasty experienced a modest revival under Yahya ibn Muhammad (r. 863–866) and especially Ali ibn Umar (r. 866–883), who managed to reassert authority over most of the Idrisid domains. Yahya ibn al-Qasim (r. 883–904) maintained stability, but the dynasty’s internal divisions had created permanent weakness.
The Zenata Ascendancy (900–974)
The 10th century saw the Idrisids caught between two external powers: the Fatimid Caliphate (Isma’ili Shia) and the Umayyad Caliphate of Córdoba (Sunni Maliki). Local Zenata Berber tribes—the Miknasa and Maghrawa—fought proxy wars on behalf of these powers, reducing the Idrisids to pawns.
| Year | Event |
|---|---|
| 909 | Fatimid revolution begins in Ifriqiya |
| 917 | Miknasa (Fatimid allies) expel Idrisids from Fez |
| 925 | Idrisids briefly retake Fez with Umayyad help |
| 927 | Definitively expelled from Fez |
| 927–74 | Reduced to Hajar an-Nasr in northern Rif |
| 974 | Defeated by Umayyad forces (who had been their allies) |
| 985 | Final Idrisid uprising fails |
The End
The last Idrisid emir, al-Hasan ibn al-Qasim, was captured by the Umayyads in 974 and died in captivity. A final attempt to restore Idrisid authority in 985 under al-Hasan ibn Gannun also failed, ending the dynasty’s rule permanently. The Zenata tribes and eventually the Almoravids would fill the power vacuum.
Rulers Chronology
| # | Ruler | Reign | Key Events |
|---|---|---|---|
| 1 | Idris I ibn Abdallah | 788–791 | Founder; poisoned by Abbasid agent |
| 2 | Idris II | 803–828 | Founded Fez; peak of Idrisid power |
| 3 | Muhammad ibn Idris | 828–836 | Senior son; ruled from Fez |
| 4 | Ali ibn Muhammad | 836–848 | Religious / pious emir |
| 5 | Yahya ibn Muhammad | 848–864 | First of the restoration period |
| 6 | Ali ibn Umar | 866–883 | Second restoration; stable rule |
| 7 | Yahya ibn al-Qasim | 883–904 | Continued stability |
| 8 | Yahya ibn Idris | 904–917 | Expelled by Miknasa |
| 9 | Fragmented leadership | 917–925 | Interregnum / exile |
| 10 | al-Hasan I ibn Muhammad | 925–927 | Brief restoration |
| 11 | al-Qasim ibn Ibrahim | 927–? | Ruled from Hajar an-Nasr |
| 12 | Abu al-Aysh Ahmad | ?–960 | Last effective Idrisid emir |
| 13 | al-Hasan II ibn al-Qasim | 954–974 | Captured and killed by Umayyads |
Cultural & Religious Significance
Islamization of Morocco
The Idrisids played a pivotal role in the Islamization of Morocco. While Berber revolts against the Umayyads had often taken on Kharijite forms, the Idrisids presented Islam through the lens of sharifian descent—a figure who combined religious authority with Arab lineage and Berber alliance.
The Founding of Fez
Fez became the lasting legacy of the Idrisid dynasty:
| Achievement | Description |
|---|---|
| Foundation | Founded c. 808 CE by Idris II |
| Andalusian Settlement | 800 families from Córdoba settled west of the Fez River |
| Kairouan Settlement | Refugees from Ifriqiya settled east of the river |
| Qarawiyyin Mosque | Founded 859 CE by Fatima al-Fihri (under Idrisid rule) |
| Political Center | Capital of the Idrisid state and later dynasties |
| Intellectual Hub | Became one of the great centers of Islamic learning |
Zaydi Shia or Sunni? The Doctrinal Question
The religious orientation of the Idrisids is a matter of scholarly debate:
| View | Evidence |
|---|---|
| Zaydi Shia | Idris I was an Alid; Zaydis recognize Alid imams; early sources describe them as Shia |
| Sunni Maliki | Later Idrisids adopted Malikism; Fez became a Maliki center |
| Syncretic / Pragmatic | Idris I adapted to local Berber contexts; doctrine may have evolved over time |
The most widely accepted view is that the early Idrisids had Zaydi Shia leanings but that the dynasty pragmatically shifted toward Sunni Malikism under later rulers to gain legitimacy with the Umayyads of Córdoba.
Geography
Core Territory
- Walili (Volubilis) — First capital (Roman ruins repurposed)
- Fez — Capital founded 808 CE; twin-city layout
- Hajar an-Nasr — Last stronghold in the Rif
Extent at Peak
| Direction | Extent |
|---|---|
| North | Mediterranean coast (Tangier to the Rif) |
| South | Atlas Mountains foothills |
| East | Parts of western Algeria (Tlemcen region) |
| West | Atlantic plain (Sale to the Abi al-Khasib River) |
Natural Features
- Fez River (Wadi Fez) — Divided the two halves of the city
- Atlas Mountains — Southern boundary
- Atlantic Coast — Western access
- Rif Mountains — Eastern / northern frontier
Economy
Agriculture
| Crop | Region |
|---|---|
| Olives | Fez region, Atlantic plains |
| Cereals | Saïs plain, Gharb |
| Fruits | Figs, grapes, pomegranates |
| Saffron | High-value export |
Coinage
The Idrisids minted silver dirhams bearing:
- The name of the ruling Idrisid emir
- The date and mint location
- The shahada and Alid genealogical claims
- Inscriptions in Kufic Arabic script
Trade
| Partner | Goods |
|---|---|
| Al-Andalus | Slaves, leather, amber |
| Ifriqiya | Grain, oil, textiles |
| Sub-Saharan Africa | Gold, slaves (via Sijilmasa) |
| Europe | Luxury goods, weapons |
Legacy
The Sharifian Tradition
The Idrisids established the principle of sharifian rule—governance by descendants of the Prophet Muhammad—which became the foundational legitimizing ideology of subsequent Moroccan dynasties:
- Saadians (16th century) — Also claimed sharifian descent
- Alaouites (17th century–present) — Currently rule Morocco; also Hasanid Alids
Every major Moroccan dynasty since the Idrisids has emphasized its connection to the Prophet’s lineage.
The Foundation of Fez
Fez remains the cultural and spiritual heart of Morocco. The Qarawiyyin Mosque, founded during the Idrisid period (859 CE), is the oldest continuously operating university in the world.
Modern Reception
- Celebrated as the founders of the first Moroccan state
- Idris I’s tomb in Moulay Idriss Zerhoun is a major pilgrimage site
- Fez designated a UNESCO World Heritage Site
- Symbol of Moroccan national identity and Islamic legitimacy
Related Entries
Realms
- Emirate of Nekor — Contemporary Rifian emirate
- Emirate of Sijilmasa — Contemporary Saharan emirate
- Barghawata Confederacy — Contemporary Atlantic confederation
Characters
Events
- Battle of Fakhkh — 786 CE; triggered Idris’s flight
- Great Berber Revolt — Preceding context
- Almoravid Conquest — Later unification
Concepts
- Sharifian Legitimacy — Dynastic foundation
- Zaydi Shia — Possible early affiliation
- Maliki School — Later adopted legal tradition
- Alid Lineage — Genealogical claim
Sources
- Ibn Khaldun, Muqaddimah & History of the Berbers
- al-Bakri, Kitab al-Masalik wa al-Mamalik
- Ibn Hawqal, Kitab Surat al-Ard
- al-Ya’qubi, Kitab al-Buldan
- Abun-Nasr, Jamil M., A History of the Maghrib in the Islamic Period (1987)
- Eustache, D., “Idrisid dynasty” in Encyclopaedia of Islam
- Britannica, “Idrisid Dynasty”
- Archnet, Timeline: Idrisid (791–974)
- New World Encyclopedia, “Idrisid Dynasty”