Skip to main content
🌍Realms9 min read

Emirate of Sijilmasa

A Sufri Kharijite emirate that controlled the western trans-Saharan trade from its fortified oasis city in the Tafilalt, ruling from 757 to 976 CE.

Emirate of Sijilmasa

The Emirate of Sijilmasa was a Sufri Kharijite emirate based in the Tafilalt oasis of southeastern Morocco, founded in the aftermath of the Great Berber Revolt. Ruled by the Midrarid dynasty, it controlled the northern terminus of the western trans-Saharan trade route for over two centuries, handling the flow of gold, salt, and slaves between West Africa and the Mediterranean world. At its height, the city of Sijilmasa was described by medieval geographers as one of the most prosperous and strategically vital cities in the Maghreb—a walled oasis of extraordinary wealth built on desert commerce.


Quick Facts

AttributeValue
TypeSufri Kharijite Emirate
Period757–976 CE
RegionTafilalt (southeastern Morocco)
CapitalSijilmasa (near modern Rissani)
Founder’Isa ibn Mazid al-Aswad / Abu al-Qasim Samgu
DynastyMidrarid (Banu Midrar)
LanguageBerber (Tamazight), Arabic
ReligionSufri Kharijite Islam
Duration219 years

The City of Gold: Sijilmasa

The Gateway to the Sahara

Sijilmasa was founded around 757 CE by Sufri Kharijite refugees fleeing Umayyad persecution after the Great Berber Revolt. According to al-Bakri, the initial settlers numbered approximately 4,000. They elected ‘Isa ibn Mazid al-Aswad (“the Black”) as their first leader, but after 14 years he was executed for corruption.

Abu al-Qasim Samgu ibn Wasul al-Miknasi, chief of a Miknasa Berber branch, then assumed leadership, founding the Midrarid dynasty that would rule Sijilmasa for nearly two centuries.

Economic Powerhouse

Sijilmasa’s wealth derived entirely from its position on the trans-Saharan trade routes:

CommodityOriginDestination
GoldGhana / WangaraMediterranean ports
SaltTaghaza / TaodeniWest Africa
SlavesSahel / SudanMaghreb / al-Andalus
IvoryWest AfricaMediterranean
CopperMa’den IjafenNorth Africa
GlasswareMediterraneanWest Africa

Ibn Hawqal, visiting around 951 CE, reported that the annual volume of trade passing through Sijilmasa was beyond calculation. The city minted its own coinage—gold dinars and silver dirhams—that circulated across the Maghreb and into al-Andalus.

The Oasis Civilization

The Tafilalt oasis was made productive by an extensive canal system drawing water from the Ziz River. This allowed date palm cultivation and agriculture sufficient to sustain a large urban population. The city walls stretched for approximately 5 miles (8 km), enclosing a dense urban core with markets, mosques, and administrative quarters.


History

Foundation & Early Midrarids (757–820)

Following the Great Berber Revolt (739–743), Kharijite refugees—primarily Sufris—fled Umayyad reprisals and established themselves at the Tafilalt oasis. The settlement quickly grew as dissidents, merchants, and tribes seeking independence from caliphal authority gathered there.

Under Abu al-Qasim Samgu and his immediate successors, Sijilmasa transformed from a refuge into a commercial hub. The Midrarids maintained good relations with both the Rustamid imamate of Tahert and the Barghawata Confederacy, forming a network of Kharijite-aligned states across the Maghreb.

The Golden Age (820–900)

The mid-9th century marked the peak of Midrarid power. Under rulers like al-Yasa’ ibn al-Qasim and al-Muntasir, Sijilmasa reached its apogee as a commercial center. Caravans arriving from the south brought gold that was then exported to the Aghlabids of Ifriqiya and the Umayyads of Córdoba.

This period also saw significant intellectual activity. Sijilmasa hosted scholars of the Sufri tradition and maintained correspondence with other Kharijite centers. The city’s cosmopolitan character—a blend of Berber, Arab, African, and Jewish communities—made it a unique cultural crossroads.

Fatimid Domination & Decline (900–976)

The 10th century brought existential challenges. The rising Fatimid Caliphate, expanding from Ifriqiya, sought to bring the trans-Saharan gold trade under its control. In 909, Fatimid forces under Masala ibn Habus invaded and imposed tributary status on Sijilmasa.

However, the most devastating event occurred in 951–952, when the Fatimid general Jawhar al-Siqilli (later conqueror of Egypt) destroyed the city’s irrigation canals, crippling its agricultural base. The Midrarids continued as vassals, but the city never fully recovered.

YearEvent
757Foundation by Sufri refugees
758Midrarid dynasty established
790sRelations with Idrisid dynasty
909Fatimid invasion; tributary status
951–52Jawhar al-Siqilli destroys irrigation
976Fatimids depose last Midrarid ruler
985Brief Idrisid restoration attempt fails
1393City abandoned after Banu Wattas sack

Abandonment

Unlike other medieval cities that evolved into modern urban centers, Sijilmasa was gradually abandoned. The Banu Wattas (Wattasid dynasty) sacked the city in 1393, and the site was never rebuilt on a comparable scale. The Alaouite dynasty later built their capital at nearby Rissani, but the precise location of Sijilmasa itself was lost to history until archaeological excavations in the 1980s.


Rulers Chronology (Midrarid Dynasty)

#RulerReignKey Events
‘Isa ibn Mazid al-Aswad757–771First leader; executed for corruption
1Abu al-Qasim Samgu ibn Wasul771–?Founder of Midrarid dynasty
2Abu al-Yasa’ Midrar?–823Consolidated rule
3Abu al-Muntasir al-Yasa’823–867Peak of prosperity
4Maymun ibn al-Yasa’867–?Internal disputes
5Ahmad ibn Maymun?–?Fatimid pressure mounts
6Abu al-Qasim ibn al-Walilc. 908Faced Fatimid invasion
7Abu Muhammad ibn al-Walilc. 909Subjugated by Fatimids
8–?Vassal rulers909–976Under Fatimid / Umayyad influence

Religion

Sufri Kharijism

The Midrarids adhered to Sufri Kharijite Islam, a branch of Kharijism that was less militant than the Azariqa but maintained the core Kharijite principles:

DoctrineDescription
ImamateAny qualified Muslim can lead, regardless of lineage
WorksFaith must be demonstrated through action
CaliphateRejected Umayyad and Abbasid claims to legitimacy
TaqiyyahPermitted concealment of belief under persecution
Free WillAffirmed human free will (contra Jabriyya)

Religious Tolerance

Despite their Kharijite orientation, the Midrarids were pragmatic rulers who valued commerce over conversion. The city was known for its religious diversity:

  • Muslims — Sufri (dominant), Sunni (Maliki), Shia (Isma’ili)
  • Jews — An established community engaged in trade
  • Ibadis — Co-religionists from Tahert with commercial ties

Geography

Territory

  • Core: Tafilalt oasis, along the Ziz River
  • Extent: Control over the Tafilalt, Draa Valley, and desert oases southward
  • Fortifications: Walled city stretching 5 miles along the river

Key Locations

  • Sijilmasa — Capital, trade entrepôt, and religious center
  • Tafilalt — Oasis complex providing agricultural sustenance
  • Ziz River — Lifeline of the oasis
  • Rissani — Modern settlement near the ruins

Natural Features

  • Ziz Valley — Palm oasis and canal-irrigated farmland
  • Sahara Desert — Southern trade routes
  • Atlas Mountains — Northern barrier and source of water

Economy

The Gold Trade

Sijilmasa’s primary economic function was the exchange of Sudanese gold from the Ghana Empire and Wangara region for Saharan salt from Taghaza. This trade:

  • Supplied the gold for Aghlabid, Fatimid, and Umayyad coinage
  • Made Sijilmasa one of the wealthiest cities in the medieval Maghreb
  • Funded the Midrarid state and its military

Trade Networks

PartnerGoods ExportedGoods Imported
Ghana EmpireSalt, copper, glasswareGold, ivory, slaves
Fatimid IfriqiyaGold, slavesTextiles, ceramics
Umayyad CórdobaGold, leatherSilk, manufactured goods
Tahert (Rustamid)Dates, goldBooks, scholarly works
BarghawataSalt, goldFish, agricultural products

Agriculture

The canal system branching from the Ziz River supported:

CropUse
Date PalmsStaple food, export
BarleyAnimal fodder, bread
WheatBread for urban population
FruitsFigs, pomegranates, grapes
VegetablesLocal consumption

Legacy

Historical Significance

  • Northern anchor of the trans-Saharan gold trade for over 200 years
  • One of the wealthiest medieval cities in the Maghreb
  • Model of Kharijite governance — religious dissent combined with commercial pragmatism
  • Precursor to Alaouite power — the Tafilalt remained the ancestral home of Morocco’s current ruling dynasty

Archaeological Rediscovery

Excavations led by the World Monuments Fund (1988–1996) uncovered:

  • City walls and defensive towers
  • A congregational mosque and possible hammam
  • Residential quarters with evidence of craft production
  • Irrigation canals and water management systems
  • Coin hoards confirming the city’s minting operations

Modern Reception

  • Marginalized in mainstream Moroccan historiography (Kharijite heritage)
  • Reclaimed by Tafilalt and Amazigh cultural movements
  • Symbol of Morocco’s Saharan destiny and trans-African connections
  • Tourist site — the ruins are accessible near Rissani, though largely unexcavated

Realms

Events

Concepts


Sources

  • Ibn Hawqal, Kitab Surat al-Ard (c. 988 CE)
  • al-Bakri, Kitab al-Masalik wa al-Mamalik
  • Ibn Khaldun, Muqaddimah & History of the Berbers
  • al-Ya’qubi, Kitab al-Buldan
  • Love, Paul M. Jr., “The Sufris of Sijilmasa: toward a history of the Midrarids” (2010)
  • Messier, Ronald A. & Miller, James A., The Last Civilized Place: Sijilmasa and Its Saharan Destiny (2015)
  • Lightfoot, Dale R. & Miller, James A., “Sijilmassa: The rise and fall of a walled oasis in medieval Morocco” (1996)