al-Hasan ibn Muhammad al-Idrisi "al-Hajjam"

الحسن بن محمد الإدريسي الحجّام

c. 930 CE · c. 318 AH

Maghreb

al-Hasan ibn Muhammad ibn al-Qasim ibn Idris, nicknamed al-Hajjam ('the cupper'); brave and daring, he rose at Fez in 313 AH, killed its Kutama governor Rayhan and drew the city to his bay'a — then fought Musa ibn Abi al-Afiya at the Fahs Adadh field between Taza and Fez, known then as Wadi al-Matahin; the day went to Ibn Abi al-Afiya, and when al-Hajjam's own governor on the Qarawiyyin bank, Hamid ibn Hamdan al-Hamdani, betrayed him and advised flight, Fez fell and the Idrisid kingship in the Maghreb ended.

DraftWritten with AI help from the sources it cites, and not yet read by a human editor.

Depth

At a glance

Roles
Ruler · military-commander
Era
Abbasid Fragmentation
Region
Maghreb
Identifiers
Wikidata

Life in time

825850875900925950975100010251050 c. c. c.
The Early Abbasid Caliphate · Abbasid Fragmentation · The Buyid, Fatimid and Seljuk Era Contemporaries: Abd al-Rahman al-Sufi · 'Abd al-Warith ibn Sufyan · Abu Ahmad Assal · Abu al-Arab al-Tamimi, Muhammad ibn Ahmad · Abu'l-Sa'ib 'Utba al-Hamadhani

In space

Maghreb

Map: Natural Earth, public domain · places and route from the graph

Overview

Al-Hasan ibn Muhammad ibn al-Qasim ibn Idris al-Idrisi, titled al-Hajjam. Ibn Khaldun describes him as bold and courageous. He rose in Fez in 313 AH and killed its governor Rayhan al-Kutami, and people gathered to give him the allegiance. 1

The battle of Wadi al-Matahin

Musa ibn Abi al-Afiya went out to fight him, and they advanced on each other on the plain of Adhad between Taza and Fez, known that day as the Wadi al-Matahin. The war grew fierce, and the outcome was in favour of Ibn Abi al-Afiya, so al-Hasan returned to Fez. 1

Then his agent over the Qarawiyyin bank, Hamid ibn Hamdan al-Hamdani, betrayed him and gave Ibn Abi al-Afiya control of the city. Ibn Khaldun says he was the last of the Idrisid kings in the Maghrib. 1

The museum's date of death is approximate, around 318 AH (930 CE). It is derived from the fall of Fez and needs an additional source.

Connections

Explore the connections

Lived in
Maghreb

People and things also explored

The dialects of the Maghrib· The Berber Revolt· Muslim conquest of the Maghreb· Abd al-Aziz al-Ghumari· Abd al-Aziz ibn Mansur, Hammadid· Abd al-Haqq I al-Marini· Abd al-Haqq ibn Mahyu· Abd al-Jawwad al-Dumi

Sources

  1. Kitab al-Ibar of Ibn Khaldun
Cite this page

islam.museum contributors. “al-Hasan ibn Muhammad al-Idrisi "al-Hajjam"”. islam.museum, https://islam.museum/en/person/al-hajjam-al-idrisi/. CC BY-SA 4.0. Last updated 2026-11-23.

Improve this page on GitHub · Report an error · Help complete it · JSON

Wing

People

Prophets, companions, scholars, rulers, scientists, poets, travelers: women and men who shaped the story.
Related

The dialects of the Maghrib

What was read of the speech of the Maghrib: what the Encyclopaedia Britannica says of North Africa as a dialect group, of the imposition of Arabic on the Maghrib, of Arabic and Tamazight in Morocco and of Hassaniyya in Mauritania, and Ibn Khaldun's chapters on the speech of the cities and the Arabs' mixing with the Berbers in Ifriqiya, the Maghrib and al-Andalus. No description of the features of the Maghribi darija, and no count of its speakers, was found. A research summary supplied to the museum later added sections on classification, main features and speaker numbers; the museum did not open the pages it cites.