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

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

c. 930 CE · c. 318 AH

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.

Depth

At a glance

Roles
Ruler · military-commander
Era
Abbasid Fragmentation
Region
Maghreb
Identifiers
Wikidata
Review
Draft Completeness 1/5 · Help complete it

Life in time

82585087590092595097510001025 c. c. c. c. c.
The Early Abbasid Caliphate · Abbasid Fragmentation · The Buyid, Fatimid and Seljuk Era Contemporaries: Abu al-Arab al-Tamimi, Muhammad ibn Ahmad · Abu'l-Sa'ib 'Utba al-Hamadhani · Abu Bakr al-Naysaburi Abd Allah ibn Muhammad ibn Ziyad · Abu Bakr al-Sibi Ahmad ibn Muhammad · Qadi Abu Bakr Ibn al-Daqqaq al-Baghdadi

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.

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-10-19.

Improve this page on GitHub · Report an error · JSON

Wing

People

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