Skip to main content
🌍Realms9 min read

Emirate of Nekor

A Sunni Maliki emirate in the Rif mountains of northern Morocco, ruled by the Banu Salih dynasty from 710 to 1019 CE—the first autonomous Muslim state in the Maghreb.

Emirate of Nekor

The Emirate of Nekor was the first autonomous Muslim state in the Maghreb, established in 710 CE by Salih I ibn Mansur al-Himyari through a grant from the Umayyad Caliphate. Unlike the Kharijite states that proliferated after the Great Berber Revolt, Nekor remained staunchly Sunni Maliki, making it unique among the early independent polities of North Africa. Ruled by the Banu Salih dynasty for over three centuries, the emirate controlled most of the Moroccan Rif, maintaining its independence through a combination of diplomatic skill, mountainous terrain, and the backing of the Umayyads of Córdoba.


Quick Facts

AttributeValue
TypeSunni Maliki Emirate
Period710–1019 CE
RegionRif Mountains (northern Morocco)
CapitalTemsaman (early), Nekor (later)
FounderSalih I ibn Mansur al-Himyari
DynastyBanu Salih (Salihid)
ReligionSunni Islam (Maliki school)
Duration309 years

History

Foundation (710 CE)

Salih I ibn Mansur al-Himyari, a Yemeni Arab of Himyarite descent, received an iqta’ (land grant) from the Umayyad Caliph al-Walid I to govern the Rif region and propagate Islam among the local Berber tribes. He established his capital at Temsaman and began converting the surrounding tribes—primarily the Ghumara, Sanhaja, and Nafza.

The conversion was not smooth. The Berber tribes, chafing under the restrictions of Islamic law, deposed Salih in favor of a man named Dawud al-Rundi from the Nafza tribe. However, al-Rundi failed to satisfy the tribes, and they soon reappointed Salih, who went on to establish a dynasty that would rule the Rif for nine generations.

The Early Emirate (710–803)

Under Salih’s early successors, the emirate consolidated its control over the Rif:

RulerReignKey Events
Salih I ibn Mansur710–749Founder; converted Berber tribes
al-Mu’tasim ibn Salih749–?Known for piety; stable transition
Idris I ibn Salih?–760Founded the city of Nekor
Sa’id I ibn Idris760–803Moved capital to Nekor

Sa’id I ibn Idris moved the capital from Temsaman to the newly fortified city of Nekor (near modern Bni Bouayach). This coastal fortress became the political and commercial heart of the emirate, with access to Mediterranean trade routes.

The Viking Raid (859 CE)

One of the most dramatic events in Nekor’s history was the Viking raid of 859 CE. A fleet of 62 Viking ships under the legendary commanders Björn Ironside and Hásteinn, having failed to sack Rome, descended on the Moroccan coast after raiding Spain. They:

  • Sacked the city of Nekor, plundering for eight days
  • Captured two daughters of the emir, among many prisoners
  • Defeated a Muslim force sent to stop them
  • Eventually ransomed the captives to the Umayyad ruler of Córdoba

This event is recorded by the geographer al-Bakri and stands as one of the only Viking raids on African soil.

The Fatimid Threat (864–929)

The 10th century brought the rising power of the Fatimid Caliphate, which sought to expand from Ifriqiya into the Maghreb. Nekor was caught between the Fatimids and their rivals, the Umayyads of Córdoba.

RulerReignKey Events
Sa’id II ibn Salih864–916Killed by Fatimid general Messala
Salih III ibn Sa’id917–927Acknowledged Umayyad suzerainty
Abd al-Badi’ ibn Salih927–929Killed by Fatimid general Musa
Abu Ayyub Isma’il930–935Killed by Fatimid general Sandal

The Fatimids repeatedly invaded, destroyed the city, and installed governors—but each time the Umayyads backed the Banu Salih restoration. This proxy war between Fatimids and Umayyads played out across the Rif for decades.

Decline & Fall (935–1019)

After the Fatimid withdrawal to Egypt (969 CE), Nekor faced a new threat: the expansion of local Berber powers. In 1019 CE, the Azdaja Berber chieftain Ya’la ibn Futuh overthrew the Banu Salih, ending the emirate’s independence. The region fell under Almoravid control later in the century, with Yusuf ibn Tashfin destroying Nekor completely in 1080 CE.


Rulers Chronology (Banu Salih)

#RulerReignKey Events
1Salih I ibn Mansur710–749Founder; briefly deposed then restored
2al-Mu’tasim ibn Salih749–?Pious ruler; stable reign
3Idris I ibn Salih?–760Founded city of Nekor
4Sa’id I ibn Idris760–803Moved capital to Nekor
5Salih II ibn Sa’id803–864Survived brother’s revolt
6Sa’id II ibn Salih864–916Killed by Fatimids
7Salih III ibn Sa’id917–927Umayyad allegiance restored
8Abd al-Badi’ ibn Salih927–929Killed by Fatimids
9Abu Ayyub Isma’il930–935Killed by Fatimids
10Interregnum / Later rulers935–1019Period of decline

Religion

Sunni Maliki Orthodoxy

Nekor was unique among early Maghrebi states for its exclusive adherence to Sunni Islam following the Maliki school. While the Umayyad Caliphate had adopted Malikism as official doctrine in al-Andalus, most of the Maghreb had fragmented into Kharijite (Sufri, Ibadi) and Shia (Idrisid, Fatimid) polities. Nekor remained:

  • Loyal to the Umayyad Caliphate of Córdoba (after initial Umayyad backing)
  • Opposed to Kharijism (Barghawata, Sijilmasa, Rustamids)
  • Opposed to Isma’ilism (Fatimids and their allies)
  • A center of Maliki scholarship in the Rif

Relations with Other Faiths

  • Jews — A significant Jewish community existed in Nekor, engaged in Mediterranean trade
  • Christians — Some remnants of the pre-Islamic Christian population remained in the Rif
  • Berber traditions — Pre-Islamic customs persisted among rural tribes

Geography

Territory

At its height, the emirate comprised most of the Moroccan Rif:

  • East: Zouagha and Djeraoua tribes, bordering the territory of the Matmata and Kebdana
  • West: Ghomara region, bordering the Mestassa and Sanhaja
  • South: Awraba, Zenata, and other interior tribes
  • North: Mediterranean coast (approximately 5 miles from Nekor)

Key Locations

  • Nekor — Capital and commercial center (now partially submerged by Abdelkrim Khattabi dam reservoir)
  • Temsaman — Original capital
  • Ajdir — Settlement of Andalusian refugees
  • Al-Hoceima Bay — Coastal access point

Natural Features

  • Rif Mountains — Defensible terrain; limited outside invasion
  • Mediterranean Coast — Trade and communication with al-Andalus
  • Nekor River — Agricultural lifeline

Economy

Agriculture

CropNotes
OlivesOil production for trade
FigsMajor export
GrapesBoth table grapes and winemaking (pre-Islamic)
CerealsWheat and barley for local consumption
AlmondsCultivated in mountain terraces

Trade

Nekor’s coastal position made it a natural hub for Mediterranean commerce:

PartnerGoods
Umayyad CórdobaAgricultural products, leather
Idrisid FezTimber, minerals
IfriqiyaOlive oil, dried fruit
Al-AndalusRefugees brought urban skills, textiles

The emirate also benefited from Andalusian immigration during the famines that periodically afflicted al-Andalus. These refugees settled primarily in the Ajdir area, bringing agricultural techniques and crafts.


Society & Culture

Tribal Composition

  • Ghumara — Major confederation in the western Rif
  • Sanhaja — Significant presence in the region
  • Nafza — One of the earliest tribes to interact with the Banu Salih
  • Ait Ouriaghel — Often in conflict with the emirate
  • Igzenayen — Allied with Ait Ouriaghel in revolts
  • Zouagha & Djeraoua — Eastern tributary tribes

The Banu Salih Court

The emirate’s court was described as a modest center of Arabic learning, with the Banu Salih emirs patronizing poets and scholars. The court maintained:

  • Correspondence with Umayyad emirs in Córdoba
  • Diplomatic exchange with the Idrisids
  • A small standing force supplemented by tribal levies

Military

Forces

ComponentNotes
Standing GuardSmall professional force for the capital
Tribal LeviesPrimary military strength
Naval CapacityLimited coastal patrol capability

Key Conflicts

ConflictDateOutcome
Viking Raid859City sacked; captives ransomed
Ghomara Revolt9th c.Defeated by Sa’id I
Fatimid Invasion #1916Sa’id II killed; Fatimids hold for 6 months
Fatimid Invasion #2929Abd al-Badi’ killed; city destroyed
Fatimid Invasion #3935Abu Ayyub killed
Almoravid Conquest1080City destroyed by Yusuf ibn Tashfin

Legacy

Historical Significance

  • First autonomous Muslim state in the Maghreb (predates Idrisids by 78 years)
  • Only Sunni Maliki state among the early independent Maghrebi polities
  • Bridge between al-Andalus and the Maghreb — maintained close ties with Córdoba
  • Record of the only Viking raid on mainland Africa south of the Mediterranean

Modern Reception

  • Commemorated in Rifian regional identity
  • Archaeological site partially submerged by the Abdelkrim Khattabi dam
  • Studied as an example of early Arab-Berber state formation
  • Symbol of the Rif’s historical role as a distinct political entity within Morocco

Realms

Characters

Events

Concepts


Sources

  • al-Bakri, Kitab al-Masalik wa al-Mamalik
  • Ibn Khaldun, History of the Berbers
  • Ibn Hawqal, Kitab Surat al-Ard
  • al-Ya’qubi, Kitab al-Buldan
  • Harvard African Studies (1931), Vol. 1
  • Price, Neil, “Spain, North Africa and the Mediterranean” in The Viking World (2008)