Sīdī ʿAlī ibn Ḥirzihim: Morocco's First Sufi Shaykh and the Rābiṭa That Built Moroccan Sufism
When Abū ʿAbd Allāh Muḥammad ibn ʿAbd al-Karīm al-Tamīmī al-Fāsī sat down to compose al-Mustafād fī Manāqib al-ʿUbbād bi-Madīnat Fās wa-mā Yalīhā min al-Bilād—the earliest surviving biographical dictionary of Fez's saints and scholars—he placed one name before all others. Not the Idrīsid imams whose blood had founded the city; not the Qarawiyyīn jurists whose fatwas had governed it; not the Almohad caliphs whose armies had conquered it. Entry number one, the opening biography of the entire work, belonged to a man al-Tamīmī had known in his own lifetime, a man who died roughly forty years before al-Tamīmī's own passing: al-Shaykh al-Faqīh Abū al-Ḥasan, Sayyidī ʿAlī ibn Ismāʿīl ibn Ḥirzihim.
The placement was a statement. Al-Tamīmī was not arranging his subjects chronologically or alphabetically; he was declaring precedence. In a city saturated with saints, in a century defined by the collision of empires and the persecution of awliyāʾ, one figure stood at the threshold of everything that followed. Sīdī ʿAlī ibn Ḥirzihim was the man who ordered the burning of al-Ghazālī's Iḥyāʾ ʿUlūm al-Dīn—the most consequential act of intellectual censorship in Maghribi history—and the man who, according to the hagiographic tradition, saw the Prophet ﷺ in a dream defending al-Ghazālī's work — a vision so vivid that lash-marks are said to have remained on his back until death. He was the Mālikī faqīh who practiced the Malāmatiyya before anyone in Morocco knew its name. He was the Qarawiyyīn scholar whose rābiṭa connected Baghdad's Suhrawardian methods to rural Moroccan ribāṭ networks. He was the spiritual master who trained Abū Madyan Shuʿayb, directed disciples who would reach al-Shādhilī, and created the institutional node through which Moroccan Sufism would transform itself from regional practice into global ṭarīqa. And he was the saint whom the Almohad state imprisoned in Fez—confirming what his life had always demonstrated: that institutional authority and divine authority operate by different laws.
His shrine stands today outside Bāb al-Futūḥ in Fez, a great qubba rebuilt by the Marinid governor Muḥammad ibn Muḥammad al-Ṣaqqār, known across generations as a site where prayers are answered and needs fulfilled. Since the early ʿAlawī period, the custodianship of this shrine—together with the shrine of his kinsman Sīdī Ḥarazim and that of Sīdī ʿAbd al-ʿAzīz al-Dabbāgh—has been held by the Dabbāgh family, the sharīfian lineage whose ancestors the Almoravid sultan Yūsuf ibn Tāshfīn once invited across the Strait of Gibraltar bi-qaṣd al-tabarruk bihi. This article is written from within that custodianship—not as a neutral academic exercise but as an act of khidma, an offering to the memory of a saint whose baraka continues to operate, whose shrine continues to heal, and whose legacy continues to shape the city that produced him.
The thesis this article advances is that Sīdī ʿAlī ibn Ḥirzihim's biography encodes the entire crisis of religious authority in sixth/twelfth-century Morocco. His life spans the transition from Almoravid rule to Almohad conquest, from dry Mālikī enforcement to Mahdist theological revolution, from the burning of al-Ghazālī's books to the imprisonment of the saints who had embraced them. Every major question that defined Moroccan Islam in this period—who may teach, who may judge what is orthodox, whether divine knowledge can be contained by institutional forms, whether the Prophet ﷺ speaks to the living through dreams that carry juridical force—passes through this single figure. To understand Sīdī ʿAlī ibn Ḥirzihim is to understand the fault lines upon which Moroccan Sufism was built.
1. The City: Fez as Engine, Crossroads, and Battlefield
Fez was never merely a city. It was a claim — built by Mawlāy Idrīs I on the right bank of Wādī al-Jawāhir in 172/788, doubled by his son Mawlāy Idrīs II on the left bank with al-ʿĀliyya in 192/808, and from the moment of its founding designed to function not as a provincial seat but as a rival to Baghdad and Córdoba. Water turned its mills, silver stamped its dirhams, and the khuṭba of its imām carried a Prophetic claim that neither the Abbasids nor the Umayyads could tolerate. When Mawlāy Idrīs II declared from the minbar of Masjid al-Shurafāʾ — "Do not bow to any authority but ours, for the Kingdom of God (imāmat al-Ḥaqq) you seek is not attainable except through us" — he was not delivering a sermon. He was announcing a civilization.
Al-Bakrī, writing in the fifth/eleventh century, described Fez as an economic engine without parallel in the western Islamic world: its markets organized by craft, its quarters fed by springs and rivers, its commercial networks braiding the Saharan gold routes to the Mediterranean. The city did not merely participate in trade — it organized it, attracting Andalusī refugees who brought the decorative arts, Qayrawānī scholars who brought jurisprudence, trans-Saharan merchants who brought gold, and Jewish financiers who brought metallurgy and the languages of Mediterranean commerce. Fez became pluralist by structure, and this pluralism made it unconquerable from within.
But Fez could be besieged, infiltrated, and contested from without — and it was, relentlessly, across three centuries. The Fatimids dispatched Maṣāla ibn Ḥabūs al-Miknāsī against it in 309/921, forcing the Idrīsid imām Yaḥyā ibn Idrīs to pronounce the khuṭba in the Fatimid name — a humiliation reversed within a year when al-Ḥasan al-Ḥajjām stormed the city and expelled the Fatimid governor. The Midrārids of Sijilmāsa raided from the south. The Umayyads of Córdoba, working through their Zanāta clients, controlled Fez intermittently — and when they did, the city's ʿulamāʾ responded with the tactical diplomacy of the scholar Abū Jayda al-Yazighī (d. 365/950), who when asked whether Fez had been taken willingly or by force, answered: "Neither willingly nor by force. Her inhabitants are simply resigned to it." The Banū Ifrān and the Maghrāwa governed for roughly eight decades — a regime of management rather than command, Mālikī in practice, Umayyad in orientation, Idrīsid in memory, hostile to any comprehensive reorganization of religious authority. Even Mūsā ibn Abī al-ʿĀfiya's (d. 326/938) massacre of four hundred sharīfs at Wādī al-Shurafāʾ — the third great slaughter of the Prophet's ﷺ family after Karbalāʾ and Fakh — could not erase the Idrīsid imprint from the city's fabric. Fez survived because it had no single center to strike at: its authority circulated through mosque, market, shrine, and river, and no conqueror could behead what had no single head.
When Yūsuf ibn Tāshfīn entered Fez in 455/1063, he did not make it his capital. He chose instead to build Marrakesh — a new city on the Ḥawz plain, in Maṣmūda territory, a city without memory, without Idrīsid shrines, without competing claims to authority. The decision was strategic and revealing: Fez was too saturated with history, too layered with loyalties, too dense with scholars and saints whose authority predated the Almoravids by two centuries. To rule from Fez would have been to govern inside an Idrīsid inheritance the Ṣanhāja newcomers could never fully claim. Marrakesh was theirs alone — a city built from nothing, on nobody's memory, bearing nobody's baraka but what the dynasty itself could generate.
Yet Fez could not be ignored. The Qarawiyyīn remained the intellectual capital of the Islamic West, the institution through which Mālikī jurisprudence was certified from Timbuktu to Damascus. The Almoravids needed its scholars, its prestige, its administrative infrastructure. They ruled Fez without ruling from it — imposing their Mālikī legal order, constructing a judicial hierarchy unprecedented in the Maghrib, but always governing at a distance, from a capital designed to compete with the city they could not absorb.
What the Almoravids imposed on Fez was the terminus of a chain that stretched from Baghdad to Qayrawān to a ribāṭ in the Sūs. The Qādirī mīthāq of 408/1017 had defined Sunni orthodoxy; Abū Bakr al-Bāqillānī had constructed the Ashʿarī synthesis; Abū ʿImrān al-Fāsī had transmitted Mālikī jurisprudence from Qayrawān; Waggāg ibn Zallū — an Idrīsī sharīf — had combined sharīfian baraka with Mālikī training at Ribāṭ Aglū; and ʿAbd Allāh ibn Yāsīn had militarized the apparatus into al-Murābiṭūn. The Fatimids were contained — not by the Zīrids in Ifrīqiya, who had failed catastrophically, but by the Almoravids in the far West. The Mīthāq al-Qādirī won. But it won through executors who knew furūʿ and nothing else.
The Almoravid legal order was built on a deliberate exclusion. The Murābiṭūn fuqahāʾ had suppressed kalām, burned falsafa, and banned al-Ghazālī's Iḥyāʾ ʿUlūm al-Dīn. They had constructed the most uniform legal administration the Maghrib had ever known — a chief qāḍī in Marrakesh, regional qāḍīs with expanded powers, consultative councils of senior fuqahāʾ — and they had done so by excluding every intellectual tool that might have enabled adaptation. When the challenge came, they had no defense.
Simultaneously, ʿAlī ibn Yūsuf ibn Tāshfīn pursued centralization against every source of autonomous power. He imposed taxes on the Amghāri ribāṭ at ʿAyn al-Fiṭr — the institution whose sharīfian founders had blessed the Almoravid conquests. He appointed state qāḍīs to oversee ribāṭ affairs. He arrested Abū al-Ḥakam ʿAbd al-Salām ibn ʿAbd al-Raḥmān ibn Abī al-Rijāl ibn Barrajān al-Ishbīlī (d. 536/1141), the Andalusian Qurʾānic mystic, transported him to Marrakesh, and left him to die in custody. The policy was both logical and suicidal: logical because autonomous spiritual authority threatened centralization; suicidal because it alienated the ribāṭ networks that had legitimated Almoravid rule.
When the Almohads conquered Fez in 542/1147, they destroyed its Idrīsid walls — the declaration attributed to ʿAbd al-Muʾmin ibn ‘Ali (r. 524–558/1130–1163), "Our walls are our swords," announced that the new theological order did not require the old city's defenses. Yet the walls were later rebuilt and strengthened under subsequent Almohad caliphs, who recognized what ʿAbd al-Muʾmin's theology had denied: that Fez required fortification as much as faith. The cdid not diminish Fez — they transformed it. Al-Jaznāʾī records in Janā al-Ās that under the Almoravids and the Almohads after them, Fez reached a level of prosperity, construction, comfort, and security that no other city in the Maghrib could match. In the days of the second Almohad caliph al-Manṣūr, the city contained 785 mosques, 42 ablution houses, 80 public fountains, 93 ḥammāms, 472 mills, 3,094 weaving workshops, 47 soap manufactories, 86 tanneries, 116 dyeing houses, 12 copper and iron foundries, 11 glassworks, 135 bread kilns, and 1,000 ovens, in addition to 9,236 residential houses, 469 funduqs (hotels), 17,041 maṣriyāt (commercial upper-floor dwellings), 9,280 shops, two qaysāriyyas (shopping arcades) — one on each bank —, all within the city walls. Along the great river where it entered and exited the city stretched the workshops of the dyers, tanners, soap-makers, and weavers. This was not a city subdued. It was a city that the Almoravids and Almohads — whatever their theological impositions — invested in, built upon, and drove to the zenith of its medieval power. The walls came down, but the mills multiplied.
The Mālikī identity that defined Almoravid Fez had not always existed. The Qarawiyyīn under the Idrīsids had taught Shi’a-Zaydi jurisprudence, the school favored by the Idrīsid imāms. The man who changed this was Darrās ibn Ismāʿīl (d. 357/942), the faqīh, muḥaddith, and ʿārif who introduced al-Mudawwana al-Kubrā of Saḥnūn ibn Saʿīd into Fez. He studied under the greatest Mālikī legists of Qayrawān, journeyed as far as Alexandria and Mecca, fought against the Christians in al-Andalus, and returned to build a private mosque on the Andalusian side of Fez — not because the Qarawiyyīn welcomed him, but precisely because it did not. His Mālikī activism provoked sustained resistance from the city's pro-Idrīsid ʿulamāʾ, who resented his criticism of their Kūfan methodology and his correction of their qibla. That a scholar of Darrās's stature taught not in the great congregational mosques but in his own private mosque is evidence of the depth of the conflict.
Darrās was venerated as one of the awtād al-arḍ — the "anchors of the earth" — whose knowledge and ascetic discipline upheld the Sharīʿa locally. At his death, the iron gate of the cemetery in which he was buried fell off its hinges and never opened again, symbolizing — in popular memory — the closing of the gate of ijtihād in Moroccan jurisprudence. His baraka retained its potency after death: the most efficacious time for visiting his tomb was around sunset on Thursday evening, when the spirit of the Prophet ﷺ was thought to intercede for those who sought the saint's aid.
What Darrās began, the ribāṭs completed. The rural Idrīsid institutions — ʿAyn al-Fiṭr in Dukkala, Aglū in the Sūs, the ribāṭ of the Atlas and the Atlantic coast — had been teaching Mālikī fiqh alongside Qurʾānic sciences for over a century before the Almoravids arrived. When the Murābiṭūn imposed Mālikism as state doctrine, they were not introducing a novelty but enforcing what the ribāṭ networks had already normalized. The urban triumph of Mālikism in Fez was the culmination of a rural revolution the Idrīsids had begun.
If Fez was an economic engine and a Mālikī capital, it was also the place where every current of Islamic intellectual life collided — and where the Ḥarāzimī rābiṭa of Sīdī ʿAlī ibn Ḥirzihim sat at the intersection of them all.
From the East came the Sufi literary tradition in successive waves. The school of Ṭūs in Khurāsān had produced the foundational treatises: Abū Naṣr al-Sarrāj's Kitāb al-Lumaʿ, the first systematic exposition of Sufi doctrine; al-Kalābādhī's al-Taʿarruf; Abū Nuʿaym al-Iṣfahānī's Ḥilyat al-Awliyāʾ; al-Qushayrī's Risāla, which became the standard reference for Sufi terminology and practice. Before all of these, al-Muḥāsibī's al-Riʿāya li-Ḥuqūq Allāh had circulated — the very text Sīdī ʿAlī ibn Ḥirzihim would master so thoroughly that al-Tamīmī al-Fāsī would say "none matched him" in its exposition. And then came al-Ghazālī's Iḥyāʾ ʿUlūm al-Dīn — the synthesis that crowned the Niẓāmī project, that based everything on Abū Ṭālib al-Makkī's Qūt al-Qulūb without mentioning his name, and that arrived in the Maghrib as both the most sophisticated product of Abbasid intellectual achievement and the most dangerous threat to the Mālikī establishment.
From Ifrīqiya came another wave that deepened Fez's Sufi density. During the second half of the fifth/eleventh century, Sufi shuyūkh fled Qayrawān to the Maghrib, driven westward by the hostility of Zīrid rulers and Mālikī fuqahāʾ who had turned against them, and then by the Hilālī tribal invasions that devastated the region after 449/1057. These migrants — figures like Ibn Saʿdūn al-Qayrawānī (d. 485/1092), ʿAbd al-ʿAzīz al-Tūnisī (d. 486/1093), and Abū al-Faḍl ibn al-Naḥwī (d. 513/1119) — settled in Aghmāt, Sijilmāsa, and Fez, carrying books and formation: a lived Sufi practice shaped by decades of engagement with Mashriqi methods, sharpened by the karāmāt polemic that had divided Qayrawān's scholars, and hardened by the experience of persecution at Mālikī hands.
From al-Andalus came a different Sufi current — one shaped by juridical rigor and scholarly prestige rather than by the ecstatic traditions of Khurāsān. Al-Qāḍī ʿIyāḍ of Sabta (d. 544/1149) wrote his al-Shifāʾ bi-Taʿrīf Ḥuqūq al-Muṣṭafā in a register that was unprecedented: a work of Prophetic devotion composed in the idiom of a Mālikī jurist, fusing legal authority with Sufi love — the Sufi Shifāʾ answering Ibn Sīnā's philosophical Shifāʾ, and al-Qāḍī ʿIyāḍ answering al-Ghazālī's own theological claims with a counter-text that privileged the Prophet ﷺ over metaphysical system. Sabta itself was a Sufi city — the home of the ʿAzafī family who promoted the first celebration of the Mawlid al-Nabawī in Morocco, the base from which al-Zayyāt al-Tādilī would compose al-Tashawwuf, and the city that hosted the Dabbāgh sharīfs whose patriarch Yūsuf ibn Tāshfīn had invited across the Strait. From Tanja came Abū al-ʿAbbās Aḥmad ibn Muḥammad ibn Mūsā ibn ʿAṭāʾ Allāh al-Ṣanhājī (d. 536/1141), whose circle in Almería operated in parallel with Ibn Barrajān's in Seville — both Andalusian Sufis whose autonomous authority the Almoravid state would eventually suppress.
From the rural Moroccan landscape came the ribāṭ networks that had structured Moroccan Islam for four centuries. Ribāṭ ʿAyn al-Fiṭr in Dukkala, founded by the Idrīsid Banū Amghār, was producing the Ṭāʾifa Sanhājiyya — the earliest documented Sufi organization in the Maghrib. Ribāṭ Shākir in the Ragrāga country maintained the Maṣmūda Sufi tradition parallel to the Ṣanhāja networks. Jabal al-ʿAlam in the Ghomāra highlands was already functioning as the supreme ribāṭ of Morocco — though Mawlāy ʿAbd al-Salām ibn Mashīsh (d. 625/1227) would not emerge for another generation, and al-Shādhilī would not arrive at the mountain until after him. Abū Shuʿayb al-Sāriyā (d. 561/1166), trained at ʿAyn al-Fiṭr, had founded Ribāṭ Iliskāwīn and initiated Abū Yaʿazzā Yalannūr (d. 572/1177), the illiterate Amazigh saint of the Atlas whose baraka drew scholars from across the Maghrib. These rural networks were not peripheral to Fez — they fed into it, their students arriving at the Qarawiyyīn for juridical completion, their methods circulating through personal transmission and kinship.
And circulating beneath all of these — in manuscripts, in market conversations, in the private libraries of scholars who would not display them publicly — were the dangerous texts. The Rasāʾil Ikhwān al-Ṣafāʾ, the Ismāʿīlī encyclopedia that integrated mathematics, music, astronomy, and esoteric psychology into a sevenfold spiritual ascent, moved through the Maghrib under cover — Shīʿī cosmology wearing a philosophical disguise. Ibn Rushd in Córdoba was composing Tahāfut al-Tahāfut, his reply to al-Ghazālī's Tahāfut al-Falāsifa — defending falsafa against the very man whose synthesis the Almoravids had already burned. Ibn Sīnā's al-Shifāʾ circulated as a monument of philosophical Aristotelianism that al-Qāḍī ʿIyāḍ would answer with his own Shifāʾ — the same title weaponized for Prophetic devotion against philosophical rationalism. And Ibn Tūmart was in motion — touring the Maghreb, debating scholars, entering Marrakesh, wielding the Ashʿarī kalām and Ghazālian ethics the Almoravids had banned, preparing the revolution that would destroy the dynasty and imprison the saints.
This was the Fez into which Sīdī ʿAlī ibn Ḥirzihim was born, formed, and called to teach. And this was the intersection at which the Ḥarāzimī rābiṭa operated: between Baghdad's Suhrawardian methods, transmitted through the uncle Abū Muḥammad Ṣāliḥ ibn Ḥirzihim who had met al-Ghazālī near Jerusalem and studied under Abū al-Najīb al-Suhrawardī; the Qarawiyyīn's Mālikī curriculum, providing the juridical credibility without which no spiritual authority could survive in urban Fez; the rural ribāṭ networks, reaching through Abū Yaʿazzā and al-Sāriyā to ʿAyn al-Fiṭr and the Idrīsid institutional tradition; the Andalusian Sufi current flowing through al-Qāḍī ʿIyāḍ, Ibn al-ʿArīf, and the Sabta circle; and the Ghazālian crisis — the text that arrived carrying the full weight of Abbasid intellectual achievement and that the Almoravid state burned, the Ḥarāzimī shaykh first destroyed and then embraced, and the Almohad revolution claimed to champion while contradicting at its foundations.
No other institution in twelfth-century Morocco held all of these currents together. The Qarawiyyīn taught law but not taṣawwuf. The rural ribāṭs taught baraka-sustained practice but not kalām. The Andalusian circles produced scholars but not murabbīs. Only the Ḥarāzimī rābiṭa — an Umayyad-Qurayshī family operating without sharīfian genealogy, practicing a Malāmatī ṭarīqa unknown in the Maghrib, led by a faqīh who had burned al-Ghazālī and then wept over him — occupied the position where all these streams converged.
This was the city. This was the crisis. And this was the man.
2. The Family: An Umayyad House in an Idrīsid City
The family's name itself is contested. Al-Kattānī, in Salwat al-Anfās, notes three variants in circulation: Ḥarzahm (with kasra on the ḥāʾ al-muhmala, sukūn on the rāʾ, and after it a zāy), Ḥarzam (without the final hāʾ), and Ḥirzihim. Al-Sāḥilī states: "I have seen in the handwriting of some of the people of precision and correction: Ibn Ḥarzahm. And the first is what I hold to be most correct." Yet it is the second — Ḥarzam, without the hāʾ — "that the common people use today." The distinction matters because later biographical and hagiographic literature would consistently refer to the family as Banū Ḥarāzim or Āl Ḥarāzim, while reserving the form Ibn Ḥirzihim specifically for the most celebrated member of the house: al-Imām al-ʿĀrif al-Murabbī, Sīdī Abū al-Ḥasan ʿAlī. The shrine complex outside Bāb al-Futūḥ bears the family name in its popular form — Sīdī Ḥarāzim — while the saint himself is known to Fez as Sīdī Ibn Ḥirzihim. The name, like the family, operates on two registers: one collective, one singular; one for the house, one for the man who made it immortal.
Al-Kattānī preserves the full genealogy: Abū al-Ḥasan Sīdī ʿAlī ibn Ismāʿīl ibn Muḥammad ibn ʿAbd Allāh ibn Ḥirzihim, al-Andalusī, al-Umawī al-ʿUthmānī, al-Fāsī. The family was not sharīfian — not descended from the Prophet ﷺ through ʿAlī and Fāṭima, peace be upon them — but Umayyad-Qurayshī, tracing their lineage through the house of ʿUthmān ibn ʿAffān, may God be pleased with him. They were Andalusian in origin, Fāsī by settlement, Umayyad by blood.
The full chain, as preserved in Ibn ʿAyshūn's al-Rawḍ al-ʿĀṭir al-Anfās, runs: ʿAlī ibn Ismāʿīl ibn Muḥammad ibn ʿAbd Allāh ibn Ḥirzihim ibn Zayyān ibn Yūsuf ibn Sumarān ibn Ḥafṣ ibn al-Ḥasan ibn Muḥammad ibn ʿAbd Allāh ibn ʿUmar ibn ʿUthmān ibn ʿAffān. This places the family not within the royal Umayyad line of ʿAbd al-Raḥmān al-Dākhil — the fugitive prince who founded the Córdoban emirate — but within a collateral ʿUthmānī branch that had settled in al-Andalus and later crossed to Morocco, presumably during one of the waves of Andalusī migration that followed the collapse of the Umayyad caliphate of Córdoba in 422/1031 or the subsequent ṭāʾifa fragmentation.
They were not alone. Ibn al-Aḥmar, in Buyūtāt Fās, records that numerous other Umayyad families settled in the city besides the Banū Ḥarāzim — among them the Banū al-ʿĀjī, Banū al-Kharrāz, Banū al-Shaykh, Banū Ḥabīb, Banū al-Ṭaranbaṭī, Banū al-Ṭarūn, Banū Fīlān, and Banū Ḥarūq. Fez was not merely an Idrīsid city; it was a city that had absorbed the entire genealogical map of early Islam, housing under one sky the descendants of those who had once contended for the caliphate itself.
Yet in a Moroccan landscape where the most durable form of religious authority — ribāṭ leadership, sharīfian baraka, the capacity to arbitrate, heal, and protect — rested on descent from the Prophet ﷺ through ʿAlī and Fāṭima, peace be upon them, the Ḥarāzim family possessed none of it. Their Qurayshī lineage was noble — ʿUthmān ibn ʿAffān was the third caliph, the compiler of the Qurʾān, the husband of two of the Prophet's ﷺ daughters — but it was not Prophetic in the specific sense that Moroccan authority demanded. The Ḥarāzim family's authority had to be earned through ʿilm and walāya, not inherited through Prophetic blood. When Sīdī ʿAlī ibn Ḥirzihim taught at the Qarawiyyīn, adjudicated disputes, and formed disciples in the Sufi path, he did so without the genealogical safety net that had sustained Idrīsidribāṭ founders for four centuries. His authority was demonstrated, not ascribed — and this distinction, quietly encoded in al-Kattānī's careful notation of the Umayyad lineage, is what made his achievement so remarkable and so fragile.
The father, Ismāʿīl ibn Muḥammad ibn Ḥirzihim, was himself a figure of considerable spiritual stature. Al-Kattānī describes him as al-ʿĀrif al-Jalīl, Abū al-Ṣidq — one of the great ʿārifūn, among the mighty awliyāʾ and ṣāliḥīn, a man of faḍl, dīn, ṣalāḥ, waraʿ, and yaqīn, whose prayers were answered (mujāb al-daʿwa). He possessed karāmāt recorded in al-Mustaʾfād. His nisba confirms the family's composite identity: al-Andalusī, al-Umawī al-ʿUthmānī, al-Fāsī — Andalusian, Umayyad, Fāsī, all at once.
Remarkably, the sources confirm that the father also studied under the son — intafaʿa bihi waladahu Abū al-Ḥasan, wa-akhadha ʿanhu akhdh tabarruk wa-istifāda — indicating that spiritual authority in the Ḥirzihim household did not follow conventional generational hierarchy. The son surpassed the father, and the father recognized it. This reversal — the elder submitting to the younger's spiritual authority — is itself a Malāmatī sign: the family practiced what the ṭarīqa taught, even when it inverted the natural order of patriarchal precedence.
His tomb stands near the tomb of his son, adjacent to that of his brother Ṣāliḥ — the three graves forming a family complex that maps the Ḥarāzim household's spiritual geography onto Fez's funerary landscape.
It was the uncle who created the family's most consequential institutional connection. Sīdī Abū Muḥammad Ṣāliḥ ibn Muḥammad ibn ʿAbd Allāh ibn Ḥirzihim was the figure who traveled to the Mashriq and encountered al-Ghazālī himself — an encounter that must be situated within the precise historical circumstances that made it possible.
The journey eastward followed the well-established adab al-riḥla — the Maghribi tradition of scholarly travel that sent Moroccan students across the Islamic world in search of knowledge, isnād, and spiritual formation. The route typically passed through Ifrīqiya, then to Egypt, then onward to the Ḥijāz for pilgrimage — with Moroccans traditionally arriving at Yanbuʿ, where they would pay their respects to the Ḥasanī sharīfs resident there — before continuing to al-Shām, Iraq, or wherever the traveler's scholarly ambitions led. Ṣāliḥ stayed in al-Shām for a period, then made his way to the vicinity of Bayt al-Maqdis — Jerusalem.
The timing matters enormously. Al-Ghazālī left Baghdad and his position at the Niẓāmiyya in 488/1095, entering a period of wandering and spiritual crisis that took him to Damascus, then to Jerusalem, then briefly to Hebron and the Ḥijāz, before returning to his native Ṭūs. He was not traveling with students or teaching publicly — he was in retreat, in seclusion, fleeing the very institution he had crowned. His al-Munqidh min al-Ḍalāl describes this period as one of radical withdrawal from scholarly life. The Crusaders would conquer Jerusalem in 492/1099, meaning the encounter between Ṣāliḥ and al-Ghazālī near Bayt al-Maqdis must have occurred in this narrow window — between 488/1095 and 492/1099 — when both men happened to be in Palestine: one a Moroccan traveler following the riḥla tradition, the other the most famous scholar in the Islamic world in voluntary exile from his own celebrity.
The account preserved in Salwat al-Anfās, drawing on al-Tādilī's al-Tashawwuf and al-Sāḥilī's Bughyat al-Sālik, describes the encounter with remarkable specificity. Ṣāliḥ had settled near a village close to al-Quds, where the local population appointed him imam of their mosque. When al-Ghazālī arrived at that village — during his wandering, not at the head of a scholarly entourage — he found a vine trellis (ʿarīsh ʿinab) growing in the mosque. He asked: "What is more worthy of reverence — the imam, the muezzin, the mosque, or the one on whose land this vine grows?" The villagers, who had prayed behind Ṣāliḥ without recognizing his rank, told al-Ghazālī: "This is a Maghribi — no one knows him or his worth." Al-Ghazālī's response carried the weight of a metaphysical diagnosis: "This is one of the Seven Abdāl, and you have been near him for an hour without recognizing yourselves."
Al-Ghazālī identifying a Moroccan scholar as one of the Seven Abdāl was not a novelty in Fez — Darrās ibn Ismāʿīl had already been recognized as one of the awtād al-arḍ over a century earlier, the same cosmological station under a different name. What made al-Ghazālī's recognition consequential was its source: the man who had systematized these very categories for the eastern Islamic world was now confirming that a Maghribi saint, unknown to the villagers who prayed behind him daily, occupied the same rank his own system had defined.
The uncle's connection to Baghdad and to Suhrawardian methods created the link through which these eastern currents first entered the Ḥarāzim household. Al-Kattānī raises a significant chronological difficulty regarding the transmission from Abū al-Najīb al-Suhrawardī (d. 563/1168): the dates do not fully align for a direct encounter, and al-Kattānī discusses whether the transmission may have passed through Ḍiyāʾ al-Dīn, the nephew, rather than through Abū al-Najīb directly. This chronological problem is not a minor scholarly footnote; it reveals how chains of transmission are constructed — how silsilas are assembled from available materials to connect living practice to authoritative origins, even when the historical links require interpretation. The post-Niẓāmī synthesis, having adopted the logic of graduated transmission from Shīʿī imamate theory and from the Ahl al-Ḥadīth's emphasis on connected chains, demanded that every spiritual authority be traceable through named links back to recognized origins. The pressure to produce such chains sometimes outpaced the historical record. What is beyond dispute is the institutional result: the Ḥarāzimī rābiṭa in Fez became the first institution to integrate eastern Sufi methods with Mālikī juridical training — a function no other Moroccan institution performed — and it was Abū Muḥammad Ṣāliḥ who made this integration possible.
The rābiṭa itself — the family institution that Sīdī ʿAlī ibn Ḥirzihim would inherit and transform — operated as a node connecting three distinct institutional traditions that had previously existed in isolation.
From Baghdad, through the uncle, came the Suhrawardian model of supervised spiritual formation: graded authority, ethical surrender, the shaykh as moral regulator — the architecture of disciplined tarbiya that would later produce al-Sharīshī's poem and, through it, the entire grammar of Maghribi discipleship.
From the Qarawiyyīn came Mālikī jurisprudence, ḥadīth sciences, and the scholarly prestige that no ribāṭ alone could replicate. The rābiṭa was not a rural institution operating at a distance from urban learning; it was embedded in Fez, adjacent to the Qarawiyyīn, drawing its students from the same scholarly population and its legitimacy from the same juridical tradition.
And from the rural Moroccan landscape — through the connections Sīdī ʿAlī ibn Ḥirzihim would forge with Shaykh Abū Yaʿazzā Yalannūr (d. 572/1177) when the great Amazigh saint lived in Fez for a period of years — came the indigenous ribāṭ tradition of charismatic authority, tribal embedding, and comprehensive social service that had structured Moroccan Islam for four centuries. Abū Yaʿazzā's presence in Fez was not incidental: he came to the city, attracted scholars and disciples, and his zāwiya in Fez became — and remains to this day — a favoured site of burial for Sufis, a living marker of the moment when rural baraka and urban scholarship met in the same space. Sīdī ʿAlī ibn Ḥirzihim's discipleship under Abū Yaʿazzā was not a journey to the mountains but an encounter within the walls of Fez itself — proof that the city had become the crossroads where every current of Moroccan spiritual life intersected.
The Ḥarāzimī rābiṭa was the point where these three streams converged, and Sīdī ʿAlī ibn Ḥirzihim was the figure who held them together.
His son, Sīdī Muḥammad ibn ʿAlī ibn Ḥirzihim, would continue this institutional function after his father's death — raised and trained by Abū Muḥammad Ṣāliḥ al-Mājirī (d. 631/1234), who had himself studied at Ribāṭ ʿAyn al-Fiṭr and trained in Bijāya under Abū Madyan Shuʿayb al-Ghawt (d. 594/1198) and in Baghdad under ʿAbd al-Qādir al-Jīlānī (d. 561/1166). When Abū al-Ḥasan al-Shādhilī arrived in Fez from Egypt, searching for the master who would complete his formation, it was Sīdī Muḥammad ibn Ḥirzihim at the Ḥarāzimī rābiṭa who directed him to Jabal al-ʿAlam to meet Mawlāy ʿAbd al-Salām ibn Mashīsh — the encounter that produced one of Islam's most consequential ṭarīqas. The Ḥarāzimī rābiṭa operated as an institutional compass, identifying where specific types of spiritual formation could be obtained across Morocco's accumulated pedagogical landscape. But the story of Sīdī Muḥammad ibn Ḥirzihim — his formation under al-Mājirī, his custodianship of the rābiṭa, his role in directing al-Shādhilī, and his burial at Ḥammāt Khūlān outside Fez — demands its own treatment, and will receive it in a forthcoming article in this series.
3. The Man: Faqīh, Malāmatī, Murabbī
Al-Tamīmī al-Fāsī, who knew Sīdī ʿAlī ibn Ḥirzihim's circle directly, opens his entry in al-Mustafād with a description that combines juridical credential with spiritual paradox: "Among them is the Shaykh, the Faqīh, Abū al-Ḥasan, ʿAlī ibn Ismāʿīl ibn Ḥirzihim. He was good, virtuous, devout, scrupulous, an ascetic, a follower of the ṭarīqa of the Malāmatiyya—and this ṭarīqa was not yet known in the Maghrib." Al-Kattānī, in Salwat al-Anfās, amplifies the description with a chain of honorifics that maps the full range of Sīdī ʿAlī's authority: al-Shaykh al-Faqīh al-Ṣāliḥ, al-Zāhid al-Waraʿ al-Nāṣiḥ, al-ʿĀlim al-ʿAllāma al-Fāḍil, al-Walī al-ʿĀrif al-Kāmil, Dhū al-Anwār al-Sāṭiʿa wa-l-Barāhīn al-Qāṭiʿa, al-Tiryāq al-Nāfiʿ—"the Beneficial Antidote"—a title suggesting that his very presence cured what ailed the community.
The most significant title, however, is the one al-Kattānī assigns to the entry itself: al-Imām al-ʿĀrif al-Murabbī. Each term carries institutional weight. Al-Imām: religious authority in the fullest sense, not merely a prayer leader but a figure whose judgment constitutes binding guidance. Al-ʿĀrif: possessor of maʿrifa, the direct experiential knowledge of God that transcends textual learning. Al-Murabbī: the spiritual educator, the one who raises souls—the very term the Niẓāmī system reserved for its institutional shaykhs, applied here to a man who would burn and then embrace the system's foundational text. That Sīdī ʿAlī ibn Ḥirzihim held all three titles simultaneously—imam, gnostic, and spiritual educator—demonstrates that his authority operated across registers that the institutional model treated as separate domains requiring separate credentials.
His Malāmatī practice is the key to his character, and al-Tamīmī identifies it with precision. The Malāmatiyya—the "people of blame"—cultivated deliberate self-concealment: they hid their spiritual states from public view, invited criticism rather than admiration, and rejected any outward sign that might attract followers for the wrong reasons. This was not modesty as social convention but a systematic technology of ego-destruction. The Malāmatī saint appears ordinary, even blameworthy, to the uninitiated; only those with baṣīra perceive his true station. Al-Tamīmī's note that "this ṭarīqa was not yet known in the Maghrib" means Sīdī ʿAlī ibn Ḥirzihim introduced a spiritual method to Morocco that no one had encountered before—and that "the people of Fez used to criticize him for some of his states" (yankurūna ʿalayhi baʿḍ aḥwālihi). The criticism was built into the method: a Malāmatī who is not criticized has failed.
Al-Kattānī preserves details of his physical austerity that confirm the Malāmatī orientation. His clothing in summer: a cotton dirāʿa and a woolen ṣāfiya. In winter: a second cotton dirāʿa and a short muʾtazar on his head. No silk, no ornament, no display. He was described as sharīf al-nafs (noble of soul), mutawāḍiʿan li-l-fuqarāʾ (humble before the poor), lam yur azhad minhu (none was held in less esteem by himself). He did not demean anyone, nor aggrandize himself over anyone. He accepted both young and old, and his prayers were answered.
Al-Tamīmī's portrait adds the crucial detail: "He was, may God have mercy on him, greatly revered for learning—he would honor its due. His stature was averse to approaching the sultan, noble of soul, humble before the poor. There gathered in him exclusively what gathered in no other: fiqh in masāʾil, fiqh in ḥadīth, knowledge of tafsīr of the Qurʾān and taṣawwuf. As for his speech on al-riʿāya, and the speech of the Muḥāsibīs—none matched him in that." The reference to al-riʿāya—al-Muḥāsibī's foundational text on spiritual self-accounting—places Sīdī ʿAlī ibn Ḥirzihim within the earliest Baghdad tradition of Sufi ethics, the tradition that preceded and prepared the ground for the institutional shaykh model al-Suhrawardī would later systematize.
The al-Mustafād entry adds a dimension the later sources compress: Sīdī ʿAlī ibn Ḥirzihim's nephew, the Faqīh Abū al-Qāsim, was among his closest companions, and together with others from the family—including his brother Abū ʿAbd Allāh Muḥammad—they created a household of learning and spiritual practice where transmission occurred through kinship and daily proximity as much as through formal instruction. The rābiṭa was not merely an institution; it was a family.
But the titles and the austerity describe only the outer frame. The sources preserve a body of karāmāt that reveal the operative dimensions of his authority—how it functioned in practice, whom it touched, and what it commanded. These karāmāt fall into distinct registers, each illuminating a different face of his walāya.
The most revealing episode is preserved in al-Mustafād through the direct testimony of Abū Isḥāq Ibrāhīm ibn ʿAlī al-Sharīshī, who heard it from the faqīh himself. Sīdī ʿAlī ibn Ḥirzihim recounted that one night, while conducting his teaching circle at the mosque of Abū Jaʿfar at the Qaṣba, he was granted knowledge of the subtleties and secrets of the sciences—daqāʾiq al-ʿulūm wa-asrārihā—speech that no one had heard from anyone before him. He resolved to deliver it the next day. But when morning came and the majlis filled and he rose to speak, he found not a single letter of what he had prepared. The knowledge had been withdrawn entirely. Pain seized him. He reflected on the cause and realized it was what had crossed his mind—the desire to astonish, the self-regard that is the Malāmatī's mortal enemy. He repented. Then he looked out at the assembly and his eye fell upon a man whose head was bowed. The man raised his head and looked at him; he looked at the man. The man returned to his state. "Then I returned to myself," the faqīh said, "and all that I had prepared and envisioned was opened to me, and the majlis was completed. The man who had looked at me stood up—and he was al-Khiḍr, ʿalayhi al-salām."
This episode does triple work. It confirms the Malāmatī discipline: the knowledge was blocked precisely because the ego had entered the intention, and restored only after tawba. It places Ibn Ḥirzihim in the company of al-Khiḍr—who, in Sufi cosmology, attends only those who operate at the level of the abdāl or above. And it demonstrates his pedagogical honesty: he narrated his own failure to his students, making his humiliation a teaching instrument. The Malāmatī does not merely accept blame—he generates it from the raw material of his own spiritual crises.
The Khiḍrian presence at this majlis carries implications that extend far beyond the 6th/12th century. Six centuries later, it was at the shrine of this same Sīdī ʿAlī ibn Ḥirzihim—outside Bāb al-Futūḥ, administered by the Dabbāgh family as hereditary custodians—that Sīdī ʿAbd al-ʿAzīz al-Dabbāgh, the unlettered dyer of Ḥūmat al-ʿUyūn, received his own fatḥ through al-Khiḍr. The shrine is not merely a burial site; it is a maqām where the Khiḍrian function operates across centuries. The institutional saint of the 6th century and the eruptive, uninstructed walī of the 12th century received their openings at the same location, through the same figure, under opposite conditions: one within the institutional majlis, the other outside all institutional channels entirely.
Other karāmāt of perception confirm the pattern. Ibn ʿAyshūn records that the faqīh spoke openly of the jinn attending his gatherings: "Some of our brothers among the jinn attend your majlis and convey things to us daily." When a scholar arrived from the Mashriq and entered the Jīnān—the garden outside Fez—Sīdī ʿAlī recognized the man's spiritual rank before any introduction, through pure firāsa, and gave him the kiswa on the spot. The visitor acknowledged: "You are a man of ḥalāl." Perception, for Ibn Ḥirzihim, was not passive reception but active identification—the ability to read the unseen station of a stranger by the light that exuded from him.
The sources preserve two incidents that demonstrate authority over the natural order. At the rābiṭa, when an Atlas lion blocked the path at dawn, Sīdī ʿAlī went up to it, seized it by the ear, struck it, and said: "Have you not been scared away, O companion?" The Atlas lion fled. Abū al-Ḥasan told his students afterward: "You have come to know me through what you witnessed from the devotion of the rābiṭa with the lion"—taskhīr al-sibāʿ, the subjection of predators, a classical marker of walāya in hagiographic literature, but here narrated with the offhandedness of a man scolding a stray dog. Equally, his prediction of his own death belongs to this register: he fasted in Shaʿbān, prepared food for his companions, entered the ḥammām as was his daily custom, proceeded to the mosque—and was found dead on his prayer mat. He died as he lived, in routine worship, having told no one except through the quiet finality of a last meal served.
Ibn ʿAyshūn preserves the incident of the amīr and the sarīr in full. The Almoravid amīr was seated on his bed; Abū al-Ḥasan was seated below. The amīr challenged him: "How would you act with your elders?" Sīdī ʿAlī replied: "I am the one who should be in your place." The amīr descended and sat at the saint's level. He could find nothing to refute the claim except what "some merchants report from a doctor on the road"—empty worldly credentials against the weight of spiritual rank. The amīr submitted. This was not arrogance but cosmological fact as Ibn Ḥirzihim understood it: the walī outranks the sulṭān because his authority derives from a source the sulṭān cannot access. Al-Tamīmī confirms this as permanent posture, not isolated incident: his stature was munqabiḍan ʿan al-sulṭān—"averse to approaching the sultan." He did not refuse political engagement; he refused political subordination.
The sources record him as a healer, intercessor, and adjudicator whose authority operated below the level of formal institutions. A woman bedridden for years invoked his karāma—"O God, I ask You by the karāma of this faqīh"—and rose immediately. Another woman whose children had been imprisoned and beaten came to him; the qāḍī's judgment was reversed through his quiet intervention, without public confrontation. A man afflicted for approximately twenty-five years was healed after a single encounter. These are not spectacular miracles but pastoral acts—the saint as physician of last resort for those whom the formal systems of justice and medicine had failed. He gave away his entire inheritance to the poor. He accepted both young and old. His prayers were answered. The tiryāq al-nāfiʿ—"the beneficial antidote"—was not a metaphor but a job description.
4. The Network: From Dukkala to Baghdad to Jabal Zalāgh
Sīdī ʿAlī ibn Ḥirzihim did not operate alone. He operated at the center of a web — and the web is what matters, not the individual nodes but the connections between them, the directions in which knowledge, baraka, and institutional authority flowed, and the fact that no other figure in twelfth-century Morocco held as many threads simultaneously.
The thread that connected him to Baghdad ran through his teacher Abū Bakr ibn al-ʿArabī al-Muʿāfirī, who had studied in al-Ghazālī's own circles, met him in the desert wearing a patched cloak with a staff in his hand, led the embassy that secured the Abbasid caliph's investiture of Yūsuf ibn Tāshfīn, and returned to al-Andalus as the most authoritative transmitter of the Niẓāmī synthesis in the western Islamic world. Through Ibn al-ʿArabī, Sīdī ʿAlī received not merely Mālikī fiqh at its most sophisticated but a direct institutional connection to the Baghdadi apparatus that had produced the Iḥyāʾ, the Niẓāmiyya, and the entire counter-Fatimid strategy. And through the same teacher came the connection to al-Qāḍī ʿIyāḍ of Sabta — Ibn al-ʿArabī's most celebrated student — making Sīdī ʿAlī and the author of the Shifāʾ scholarly brothers within the same pedagogical lineage, connected through the man who had met al-Ghazālī face to face.
The thread that connected him to the rural ribāṭ tradition ran through Abū Yaʿazzā Yalannūr, who lived in Fez for a period of time and whose zāwiya in the city remains to this day a favoured burial site for Sufis. Through Abū Yaʿazzā, the Ḥarāzimī rābiṭa was linked to Abū Shuʿayb al-Sāriyā, who had trained at Ribāṭ ʿAyn al-Fiṭr in Dukkala under the Amghāri methods, and through ʿAyn al-Fiṭr to the entire Idrīsid institutional tradition that had structured Moroccan Islam for four centuries. When Sīdī ʿAlī ibn Ḥirzihim — the Qarawiyyīn-trained faqīh, the urban scholar — submitted himself to the authority of a man who could neither read nor write Arabic, he was performing the act that defined the Ḥarāzimī rābiṭa's function: the fusion of scholarly credibility with charismatic baraka, of the madrasa with the khalwa, of the text with the presence. Abū Madyan would later describe what this fusion produced: "These others speak with parts of their tongues, but their words are not worthy even to call the prayer. Since I seek only God with my words, they come from the heart and enter the heart."
The thread that connected him to al-Andalus ran in multiple directions simultaneously. Ibn al-ʿArīf of Tangier and Almería had built a circle that included Abū al-Ḥasan ʿAlī ibn Khalaf ibn Ghālib al-Qurashī al-Andalusī (d. 568/1173)— originally from Silves in western al-Andalus, who studied in Córdoba under Ibn al-ʿArīf, settled in Fez where he taught and formed disciples, and later withdrew to al-Qaṣr al-Kabīr where he spent the rest of his life and was buried outside Bāb Sabta. In Fez, he became another of Abū Madyan's teachers, carrying the Andalusian Sufi current directly into the same student body that the Ḥarāzimī rābiṭa was forming.
Ibn Barrajān in Seville — imam of one hundred thirty-three villages in the Andalusian sierra, killed by the Almoravids in Marrakesh — operated in parallel with both Ibn al-ʿArīf and Ibn Ḥirzihim, and it was at Ibn Barrajān's funeral that Sīdī ʿAlī demonstrated the reach of his authority even in exile: when ʿAlī ibn Yūsuf ibn Tāshfīn ordered the body thrown on the garbage heap, he sent his servant into the streets of Marrakesh to proclaim that anyone who failed to attend would be cursed by God, and the sultan backed down. The Andalusian thread was not abstract scholarly exchange — it was a living network of mutual protection, shared persecution, and overlapping disciples, operating across the Strait under conditions where the Almoravid state was systematically hunting down anyone whose spiritual authority escaped juridical control.
The summons of Ibn al-ʿArrīf to Marrakesh under the same sultan was not an isolated disciplinary measure against a controversial mystic; it reveals an emerging Almoravid technique for dismantling autonomous spiritual authority. The method was precise: detach the saint from his regional network, remove him from the social geography that sustained his charisma, and relocate him into the immediate orbit of dynastic surveillance. In al-Andalus, Ibn al-ʿArrīf’s authority rested not simply on doctrine or ascetic reputation, but on living social attachment — disciples, correspondents, jurists sympathetic to mystical piety, and networks of popular devotion extending across cities and rural zones. Such authority became dangerous to the Almoravid state precisely because it could not be fully mediated through Mālikī bureaucratic structures. The empire depended on juristic legitimacy, but figures like Ibn al-ʿArīf generated another form of legitimacy altogether: moral charisma rooted in sanctity, teaching, and mass reverence.
The thread that connected him to Sijilmāsa and the Saharan edge extended his rābiṭa's reach far beyond Fez. Allied with the Ḥarāzimī circle were Sufis from the pre-Saharan oases — figures like Abū al-Faḍl ibn Aḥmad al-Sijilmāsī and Muḥammad ibn ʿUmar al-Aṣamm, who were imprisoned and exiled in Fez before being freed. More consequentially, a representative of the rābiṭa in the pre-Saharan south — Abū Muḥammad Ṣāliḥ Ū Imlīl al-Munshī, "the Polemicist" — was assassinated by the Almoravids near the caravan center of Zagora in the Darʿa valley. The killing of Ū Imlīl demonstrates that the Ḥarāzimī network was not a Fez phenomenon with distant sympathizers; it was an operational structure with representatives embedded across Morocco, and the Almoravid state pursued those representatives with lethal force across hundreds of kilometers of territory.
The thread that connected him to the Ifrīqiyan Sufi migration ran through Abū al-Faḍl ibn al-Naḥwī, the Qayrawānī scholar who had settled in Sijilmāsa and Fez, who had divided the Iḥyāʾ into thirty sections to read a complete one each evening of Ramaḍān, who had issued a fatwā declaring the sultan's order to burn the Iḥyāʾ illegitimate — asserting it did not reflect the ijmāʿ of the ʿulamāʾ and was therefore fāsid — and who had written directly to the sultan disputing the decree before being expelled from Fez and dying in exile at Qalʿat Banī Ḥammād. Ibn al-Naḥwī's most enduring contribution was not juridical but devotional: his qaṣīda al-Munfarija — "She Who Liberates" — became one of the most widely recited poems in Moroccan Sufi lodges, distilling the Ghazālian spirit of tawakkul into memorizable verse. Through Ibn al-Naḥwī, the Ḥarāzimī circle was connected to the Ifrīqiyan scholars who had carried Sufi practice westward from Qayrawān — the same migration that had deposited al-Muḥāsibī's Riʿāya and Abū Ṭālib al-Makkī's Qūt al-Qulūb into Morocco's scholarly ecosystem a generation before the Iḥyāʾ arrived.
And the thread that connected him to the Malāmatī underground ran through Abū ʿAbd Allāh al-Daqqāq, the enigmatic ecstatic whose utterances provoked criticism from official ʿulamāʾ and Sufis alike — a Malāmatī more extreme than Sīdī ʿAlī himself, recalling eastern figures like Abū Yazīd al-Bisṭāmī and al-Ḥallāj, whose defenders judged his statements permissible only because they were made under the influence of ecstatic states. Al-Daqqāq's tomb outside Bāb al-Jīsa was venerated for centuries, largely because of the reputation of his most important student: Abū Madyan al-Ghawth. Through al-Daqqāq, the Ḥarāzimī circle was connected to the most dangerous current in Moroccan Sufism — the tradition of ecstatic self-disclosure, of saintly authority proclaimed rather than concealed, of walāya that refused to hide behind the protective fictions of scholarly modesty. Sīdī ʿAlī ibn Ḥirzihim's own claim to be Quṭb al-Maghāriba — "Axis of the Maghribis" — belonged to this register, and it was this claim, together with his criticism of Almoravid ethnoclassicism, that prompted the forced closing of his rābiṭa and his exile to Marrakesh.
What held all these threads together was not a formal organization — the Ḥarāzimī rābiṭa had no membership rolls, no constitution, no hierarchical structure beyond the authority of the shaykh himself. What held them together was the fact that every thread ran through one man, one family, one institution at Bāb al-Futūḥ. The Qarawiyyīn scholar who needed Sufi formation came to the rābiṭa. The rural ribāṭ disciple who needed juridical credibility came to the rābiṭa. The Andalusian exile who needed a base in Morocco came to the rābiṭa. The Sijilmāsī activist who needed connection to the Fāsī scholarly establishment came to the rābiṭa. The Malāmatī who needed the cover of institutional respectability came to the rābiṭa. And from the rābiṭa, each went back into the network carrying what they had received — transformed, equipped, connected to currents they could not have accessed on their own.
When Abū Madyan arrived in Fez — an orphan from Cantillana who had worked as a shepherd and served as a soldier — he sat in the study circles of the Qarawiyyīn and retained nothing. Then he sat at the feet of Sīdī ʿAlī ibn Ḥirzihim. Under him, and under Abū Ghālib and al-Daqqāq who were connected to the same network, Abū Madyan absorbed every major current of Moroccan and Andalusian Sufism in a single formation — the Ghazālian tradition through Sīdī ʿAlī, the Andalusian methods through Abū Ghālib via Ibn al-ʿArīf, the ecstatic Malāmatiyya through al-Daqqāq, and the rural baraka of the ribāṭ tradition through Abū Yaʿazzā, whom he visited briefly in the Atlas and from whom he received the decisive spiritual imprint. No other student of this period received a more complete formation. And the completeness was possible only because the Ḥarāzimī rābiṭa had gathered into a single institution what the rest of Morocco kept separated.
5. The Burning and the Dream: Prophetic Authority Against Institutional Judgment
The crisis that defines Sīdī ʿAlī ibn Ḥirzihim's biography — and that reveals the deepest fault line in Moroccan Islamic authority — centers on a single book, a single dream, and a question the sources do not ask: why did a scholar whose own teacher was al-Ghazālī's direct heir need a prophetic vision to accept al-Ghazālī's work?
The book was al-Ghazālī's Iḥyāʾ ʿUlūm al-Dīn — and it was never merely a book. It was the intellectual culmination of the Abbasid counter-Fatimid project: the Niẓāmī synthesis that integrated Shāfiʿī fiqh, Ashʿarī kalām, and institutionalized taṣawwuf into a single system designed to neutralize Ismāʿīlī metaphysics while producing Sunni spiritual elites capable of competing with Shīʿī authority. Al-Ghazālī was not a freelance mystic who happened to write well; he was the man Baghdad had produced to finish what al-Bāqillānī had started and what the Niẓāmiyya madrasas had institutionalized. The Iḥyāʾ was Baghdad's gift to Sunni Islam — its most sophisticated product, its deepest claim to intellectual completeness.
When the Iḥyāʾ arrived in the Maghrib, it arrived as a foreign body inside a legal ecosystem that had been specifically designed to exclude it. The Almoravid order rested on dry Mālikī furūʿ — practical jurisprudence without kalām, without falsafa, without any speculative theology that might complicate the simple equation of obedience and enforcement. The Murābiṭūn fuqahāʾ had not been trained to evaluate the Iḥyāʾ; they had been trained to enforce rulings. A text that subordinated their fiqh to a higher spiritual science, that claimed experiential knowledge of God as the goal of Islamic learning, that insisted their legal expertise without spiritual realization was not merely incomplete but spiritually dead — this text threatened not their arguments but their existence.
The Mālikī fuqahāʾ of al-Andalus moved first. The burning of the Iḥyāʾ in Córdoba was a political act performed under Almoravid state authority — an act of intellectual enforcement consistent with the same regime that would later kill Ibn Barrajān and imprison anyone whose spiritual authority escaped juridical control. Fez followed. The burning was not spontaneous but coordinated across the empire.
Al-Subkī, in Ṭabaqāt al-Kubrā, preserves the political dimensions: “Abū al-Ḥasan ibn Ḥirzihim, when he encountered the Iḥyāʾ, examined it, then said: 'This is a bidʿa against the Sunna.' He was a shaykh with authority (muṭāʿan) in the lands of the Maghrib. He ordered that all copies of the Iḥyāʾ be collected, and wrote to the districts, and was strict in this, and threatened anyone who concealed anything from it. The people brought what they had, and the fuqahāʾ gathered and examined it, then they agreed to burn it on Friday. Their gathering was on Thursday.”
Al-Kattānī's account, drawing on al-Tādilī's al-Tashawwuf, adds the autobiographical detail: Sīdī ʿAlī ibn Ḥirzihim himself described the process: "I devoted myself to reading the Iḥyāʾ ʿUlūm al-Dīn of al-Ghazālī in a period of a year. I found the questions that are criticized in it, and I resolved to burn the book." The year-long study demonstrates that the burning was not ignorant rejection but informed judgment: he read the entire text, identified its problematic passages, and concluded — as a Mālikī faqīh operating within the Almoravid legal order — that it constituted innovation against the Sunna.
Here the narrative encounters a difficulty the hagiographic sources do not address — and that modern scholarship has largely ignored.
Sīdī ʿAlī ibn Ḥirzihim's principal teacher was Abū Bakr ibn al-ʿArabī al-Muʿāfirī (d. 543/1148) — the Andalusian scholar who had studied in Baghdad, sat in al-Ghazālī's own circles, absorbed his methods, and returned to the Maghrib as the most authoritative living transmitter of al-Ghazālī's intellectual legacy in the western Islamic world. Ibn al-ʿArabī was not a marginal figure who had glimpsed al-Ghazālī from a distance; he was al-Ghazālī's heir in al-Andalus, the man who carried Baghdad's synthesis westward, who led the embassy that secured the Abbasid caliph's investiture of Yūsuf ibn Tāshfīn.
The question is unavoidable: if Sīdī ʿAlī ibn Ḥirzihim studied under the man who had studied under al-Ghazālī — if the scholarly silsila connecting him to the Iḥyāʾ's author was already intact, already functioning, already available — why did he need a dream of the Prophet ﷺ to accept al-Ghazālī's work? The teacher was alive. The transmission was direct. The intellectual case for the Iḥyāʾ could have been made — and presumably was made — through the normal channels of scholarly authority. Yet the sources record no such process. They record instead a year of private study, a public burning, and then a dream.
Another enigma surfaces beyond Ibn al-ʿArabī — this time from within the Ḥarāzimī rābiṭa's own spiritual ties to Baghdad. Sīdī ʿAlī ibn Ḥirzihim's own uncle, Sīdī Abū Muḥammad Ṣāliḥ ibn Ḥarāzim, had traveled to the Mashriq, stayed in al-Shām, and is reported to have met al-Ghazālī himself near Jerusalem. This was not a passing acquaintance. Al-Ghazālī recognized Sīdī Ṣāliḥ as one of the Seven Substitutes — a rank in the invisible hierarchy of saints that placed him among the highest spiritual authorities of his age. Abū Muḥammad returned to Fez carrying al-Ghazālī's ṭarīqa and the methods he had absorbed from Abū al-Najīb al-Suhrawardī (d. 563/1168)— the very figure whose nephew's institutional model would produce al-Sharīshī's Rāʾiyya and, through it, the entire grammar of Maghribi discipleship. These methods entered the Ḥarāzimī rābiṭa not through books or formal curricula but through kinship and daily proximity — the uncle transmitting to the nephew within the household what al-Ghazālī had endorsed and what al-Suhrawardī had systematized.
The question therefore sharpens to the point of impossibility. If Sīdī ʿAlī ibn Ḥirzihim's own teacher was al-Ghazālī's scholarly heir — and if his own uncle had met al-Ghazālī in person, been recognized by him as one of the Seven Abdāl, and returned to Fez carrying both his ṭarīqa and the Suhrawardian methods that would form the rābiṭa's institutional foundation — then the case for the Iḥyāʾ was already present inside the family home, transmitted through blood and proximity, before a single copy ever arrived in the Maghrib for public debate.
Two silsilas. Two direct connections to al-Ghazālī. One institutional, one spiritual. Both alive, both functioning, both available. And both proved insufficient to prevent the burning.
The account in Salwat al-Anfās, drawing on al-Tādilī's al-Tashawwuf, preserves the narrative with precision. On the night before the Friday burning, Sīdī ʿAlī ibn Ḥirzihim is reported to have seen himself entering the mosque from its usual gate. In the corner of the mosque was light — and there sat the Prophet ﷺ, with Abū Bakr and ʿUmar, may God be pleased with them, seated beside him. The Imam Abū Ḥāmid al-Ghazālī stood before them, holding the Iḥyāʾ in his hand.
The Prophet ﷺ is said to have declared: "This is my opponent (khaṣmī)."
Then, according to the account, the Prophet ﷺ took the book and examined it, turning page after page to the end. He said: "By God, this is my thing (hādhā shayʾī)!" Abū Bakr looked and confirmed it. ʿUmar looked and confirmed it. Then the Prophet ﷺ ordered that Abū al-Ḥasan — Sīdī ʿAlī ibn Ḥirzihim himself — be stripped and given the ḥadd al-muftarī, the corporal punishment prescribed for one who makes false accusations. They stripped him and struck him. Abū Bakr interceded after five lashes. The Prophet ﷺ said: "We only did this out of caution for your sake, and out of reverence."
When he awoke, the tradition continues, he informed his companions of what had occurred. Approximately a month later, the marks of the lashing appeared on his back. The pain subsided, but the marks remained — visible, it is said, until death. And from that day forward, he became one who wept over the Iḥyāʾ and acted upon what was in it.
DAR.SIRR's position on this narrative is direct: the dream account, whatever its spiritual origin, functions in the historical record as a legitimation technology — a mechanism through which al-Ghazālī's contested text was elevated beyond the reach of scholarly debate by anchoring its authority in a prophetic endorsement no living faqīh could overrule.
This is not a claim unique to the Iḥyāʾ crisis. The deployment of prophetic dream-visions to settle doctrinal disputes that institutional mechanisms have failed to resolve is a recurrent pattern in Islamic intellectual history. When scholarly consensus condemns a position that powerful interests need rehabilitated, when the juridical system has pronounced a verdict that subsequent developments require reversed, the prophetic dream appears — providing an authority that operates above the scholarly apparatus, beyond the reach of counter-argument, immune to the dialectical tools that might dismantle any human judgment. The dream is the court of last resort precisely because its verdicts cannot be appealed through the methods available to the living.
Consider what this particular dream accomplishes as a textual-political instrument — regardless of whether one accepts its spiritual authenticity:
First, it transforms the Iḥyāʾ from a contested scholarly text into a prophetically endorsed work. The Prophet ﷺ reads every page and declares hādhā shayʾī — "this is my thing." The formula is possessive and total: not "this contains truth" or "this is acceptable" but "this belongs to me." Al-Ghazālī's synthesis of law, theology, and mysticism is claimed by the Prophet ﷺ as his own production — an extension of his Sunna, not a deviation from it. For anyone who accepts the dream's authenticity, the Iḥyāʾ is no longer debatable. It is prophetic. The pattern is not unique to al-Ghazālī. Al-Abū al-ʿAbbās Aḥmad al-Tijānī (1735–1815) attributed the composition of Jawāhir al-Maʿānī — the foundational text of the Tijāniyya — to prophetic authorization, claiming the Prophet ﷺ himself commanded its writing and endorsed its contents. Ibn ʿArabī's Fuṣūṣ al-Ḥikam carries a still more radical claim: that the work was not composed by its author but dictated to him through prophetic imposition (ilqāʾ), making the Prophet ﷺ the true author and Ibn ʿArabī merely the vessel. In each case the mechanism is identical: a text whose authority is contested among the living is placed beyond contestation by attributing it to the Prophet ﷺ — not as inspiration in the general sense but as direct, personal, possessive endorsement. The Prophet ﷺ does not merely approve these works; he claims them. They become his.
Second, it makes opposition to the Iḥyāʾ punishable by prophetic verdict. The punishment for slander, for false accusation — is applied to Sīdī ʿAlī ibn Ḥirzihim by the Prophet ﷺ himself. The juridical implication is devastating: anyone who calls the Iḥyāʾ bidʿa is, in the dream's logic, a slanderer against the Prophet's own work. The Almoravid fuqahāʾ who had endorsed the burning, the state apparatus that had enforced it, the entire legal order that had treated the Iḥyāʾ as dangerous innovation — all are retroactively condemned by the highest possible authority. Here too the pattern recurs. Al-Tijānī warned that whoever opposes his ṭarīqa opposes the Prophet ﷺ who authorized it — a claim transmitted through Jawāhir al-Maʿānī that effectively renders criticism of the Tijāniyya an act of opposition to the Prophet ﷺ himself. Ibn ʿArabī's defenders deployed the same logic against his detractors: to reject the Fuṣūṣ was to reject the Prophet ﷺ who had delivered it. The mechanism is consistent across centuries: once a text or a teaching is attributed to prophetic authority, opposition to it is no longer scholarly disagreement — it is transgression against the Prophet ﷺ, carrying not intellectual consequences but spiritual and juridical ones. The dream does not merely settle the debate; it criminalizes the losing side.
Third, the physical marks reported on Sīdī ʿAlī ibn Ḥirzihim's back serve as embodied proof — if one accepts the account. The dream is not merely subjective experience; it is said to produce material evidence visible to the community. The scars, in the hagiographic tradition, verify that the encounter occurred in a dimension where spiritual events generate physical consequences. And history appeared to confirm the verdict: the Almoravid order that burned the Iḥyāʾ collapsed within a generation. Al-Qāḍī ʿIyāḍ died in exile in Marrakesh. The judicial hierarchy was dismantled. The dynasty that burned al-Ghazālī was itself burned. For those who accepted the dream, the lash-marks on Sīdī ʿAlī ibn Ḥirzihim's back and the ruins of the Almoravid state told the same story.
Fourth, and most consequentially for the history of al-Ghazālī's reception in the Maghrib, the dream converts the crisis of authority into a permanent principle: the Prophet ﷺ can overrule the consensus of the living ʿulamāʾ through dream-vision. If the fuqahāʾ of the Maghrib examined the Iḥyāʾ, judged it bidʿa, and burned it — and the Prophet ﷺ then reversed their verdict through a dream granted to their own leader — then no scholarly consensus, however unanimous, can claim finality against prophetic endorsement. There is always a higher court, and that court operates through channels the institutional system cannot regulate.
Fifth, the Almohad revolution itself became the dream's most devastating confirmation — and its deepest contradiction. The Almohads who destroyed the Almoravid order arrived promising exactly what the dream had delivered: the rehabilitation of al-Ghazālī. Ibn Tūmart had studied in the East, claimed to have met al-Ghazālī himself, and returned wielding Ashʿarī kalām and Ghazālian ethics as weapons against the Mālikī literalism that had burned the Iḥyāʾ. The Almohad revolution was, in one reading, the political fulfillment of the dream's verdict: the destruction of the order that had opposed al-Ghazālī. Yet the Almohads built their state on a Mahdist dogma that contradicted al-Ghazālī's own project at its foundations — for the Niẓāmī synthesis had been constructed precisely to prevent the rise of infallible imams, not to produce one. The dynasty that championed al-Ghazālī's theology created the very thing his theology was designed to stop. What arrives through prophetic authority does not always serve the purposes its champions intend.
The deeper question is not whether the dream occurred but why al-Ghazālī required this particular form of rehabilitation — and what it reveals about his status in the Abbasid project.
Al-Ghazālī occupied a position in Sunni Islam that no other scholar had held before or has held since. He was not merely learned; he was presented, within the Niẓāmī apparatus, as the mujaddid — the renewer of the faith at the turn of the century — whose synthesis completed what the Prophet ﷺ had begun. His Iḥyāʾ was not merely a book of guidance; it was the definitive statement of what Sunni Islam was, what it required, and how it should be lived. To burn the Iḥyāʾ was not merely to reject a scholar's opinion; it was to reject the Abbasid project's intellectual crown, the text that Baghdad had produced to demonstrate the superiority of its Sunni synthesis over Fatimid esotericism.
The rehabilitation of the Iḥyāʾ in the Maghrib therefore required an authority commensurate with what had been rejected. A scholar's defense would not suffice — scholars had been overruled. A teacher's endorsement would not suffice — Ibn al-ʿArabī's authority as al-Ghazālī's heir had proven insufficient to prevent the burning. Only the Prophet ﷺ possessed the authority to reverse a verdict that the entire Mālikī establishment of the western Islamic world had endorsed. The dream narrative, whatever its origin, provided exactly this: a prophetic endorsement that placed the Iḥyāʾ above the juridical system that had condemned it, transforming al-Ghazālī from a controversial innovator into a man whose work the Prophet ﷺ himself claimed as his own.
This pattern — the use of prophetic authority to settle what institutional mechanisms cannot — is not an anomaly in Islamic history. It is a structural feature of a tradition in which the Prophet ﷺ remains, through the barzakh, the ultimate arbiter of disputes the living cannot resolve. The question is not whether such interventions are possible — the Islamic tradition affirms that they are — but whether specific accounts of such interventions should be accepted uncritically when they serve identifiable political and doctrinal functions. In the case of the Iḥyāʾ dream, the function is transparent: the rehabilitation of al-Ghazālī's project in territories where it had been systematically suppressed. The dream accomplished what no living authority could — and it did so at precisely the moment when accomplishment was needed.
What is beyond dispute — and what matters more than the dream's authenticity — is the result. Al-Kattānī reports that Sīdī ʿAlī ibn Ḥirzihim "continued weeping over the Iḥyāʾ and acting upon what was in it, until some of his companions took it from him — including Abū Madyan Shuʿayb (d. 594/1198), Abū Muḥammad Biskar, Abū ʿAbd Allāh al-Tāwudī ibn Sūdah (d. 580/1184), and Aḥmad ibn Ali al-Barnūsī (575/1180) of Jabal Zalāg. The Iḥyāʾ entered Moroccan Sufism not through institutional channels — not through madrasas or state-sponsored curricula — but through the personal transmission of a man who had first tried to destroy it and then dedicated the remainder of his life to teaching what it contained. The text that the Almoravid state had burned now circulated through the most authoritative Sufi network in the Maghrib, carried by the very figure the state had relied upon to suppress it.
Whether the dream caused the reversal or the reversal required the dream is a question the sources do not permit us to answer with certainty. What we can say is that the scholarly silsila — from al-Ghazālī through Ibn al-ʿArabī to Ibn Ḥirzihim — was already in place before the burning, and that it proved insufficient to prevent it. The dream narrative provided what the silsila could not: an unchallengeable endorsement from the Prophet ﷺ that transformed the Iḥyāʾ from a text one could debate into a text one could only accept or reject at the cost of opposing the Prophet ﷺ himself. In doing so, it set a precedent that would echo across Moroccan Sufi history: when institutional authority reaches its limit, prophetic authority — communicated through the barzakh, inscribed on the body, verified by the community — begins.
6. The Apparatus: How the Almohad State Managed Its Saints
The preceding section described the Almohad rupture in theological terms — the claim to Mahdist ʿiṣma, the existential threat posed by autonomous spiritual authority, the imprisonment of Sīdī ʿAlī ibn Ḥirzihim in Fez. But theology alone does not imprison saints. The machinery that detained, surveilled, co-opted, tested, beat, and killed Morocco's Sufis under ʿAbd al-Muʾmin operated through specific institutional mechanisms — and the al-Mustafād preserves their application with the specificity of a judicial ledger.
The official stance of the Muwaḥḥid state toward the mutaṣawwifa during the caliphate of ʿAbd al-Muʾmin was never a single policy but a doubled one — a siyāsa tamaʿʿuiyya, a policy of co-optation, operating simultaneously with a siyāsa iḥtirāziyya, a policy of precautionary containment. The first absorbed; the second crushed. Together, they constituted a system designed not to eliminate taṣawwuf as such — the Almohads could not afford that, given their own Mahdī's debt to Sufi vocabulary — but to ensure that no Sufi authority could operate outside the state's doctrinal perimeter.
The co-optive strategy worked through protocol. A Sufi symbol whose baraka among the Maṣmūda and Ṣanhāja populations was too vast to suppress was not persecuted but managed — allowed to continue his spiritual practice under the condition that he and his followers adopted the outward signs of Almohad allegiance: addressing the caliph as Amīr al-Muʾminīn, presenting themselves within state ceremony, signaling doctrinal conformity with Muwaḥḥid tawḥīd. The sources document that certain Sufis complied. They became participants in the Almohad protocol — their spiritual authority preserved but reframed as an extension of the state's own legitimacy rather than an alternative to it. The co-opted saint ceased to be dangerous not because his walāya was diminished but because its public expression had been captured by the caliphal apparatus. He called people to God — but he did so, visibly, under the umbrella of a state that claimed its own Mahdī as God's supreme representative. The al-ʿImrānī records that the caliph ʿAbd al-Muʾmin's written instructions to his functionaries described him in terms that deliberately combined the attributes of temporal command with the vocabulary of ascetic piety — zuhdahu wa-waraʿahu, wa-basṭahu li-ʿadlihi wa-sadādihi — zuhd, waraʿ, justice, rectitude — the very language the Sufis used to describe their own masters, now appropriated by the chancery to describe the caliph. The Muʿizz, the Almohad court historian, identified this duality as essential to ʿAbd al-Muʾmin's character: a man who combined contradictory qualities — severity and piety, cruelty and justice — in a single person whose portrait gathered ṣifāt mutanāqiḍa that would find their explanation only if one recognized the personal traits of the ruler as distinct from the institutional practices of the state.
This co-optive policy succeeded in part because it offered something the Almoravids never had. The Murābiṭūn had suppressed Sufism tout court — banning the Iḥyāʾ, killing Ibn Barrajān, closing rābiṭas — without offering any compensatory recognition of Sufi authority within the state order. The Almohads, by contrast, could point to their own founder's spiritual rank: Ibn Tūmart was not merely a jurist or a military leader but a Mahdī, a figure whose authority rested on exactly the kind of divine election that Sufis also claimed. The co-opted Sufi was not asked to deny his own experience; he was asked to subordinate it to a greater claimant — the Mahdī whose ʿiṣma superseded all lesser forms of walāya. For some, this was acceptable. For others, it was apostasy.
The precautionary strategy operated through direct physical coercion — and the cases documented in al-Mustafād reveal the trigger mechanisms with uncomfortable clarity.
The case of Abū Ibrāhīm Ismāʿīl al-Khazrajī demonstrates the precision of the state's targeting. Al-Khazrajī was not arrested for teaching taṣawwuf, nor for claiming spiritual rank, nor for any doctrinal deviation. He was arrested for delivering a khuṭba in the presence of the Almohad governor — and given a ʿaẓīma (public sermon of admonition) on the day of Jumʿa in the congregational mosque, in the presence of the Almohad ʿāmil. He was then led to prison and juʿila fī al-maṭmūra — placed in the underground dungeon. The khuṭba, in the Almohad system, was not merely a sermon but a declaration of sovereignty: the Friday address named the caliph, affirmed Muwaḥḥid tawḥīd, and positioned the speaker as a representative of the state's religious order. For a Sufi shaykh to deliver it without authorization — or to deliver it in terms that deviated from the approved formula — was to claim a public religious function the state reserved for its own appointees. The people feared him — khāfa minhu al-nās ʿalā anfusihim — so thoroughly that his imprisonment served its purpose without requiring his death.
The case of Abū ʿAbd Allāh Muḥammad ibn al-Aṣamm was more direct. He was killed in 542/1147 — the very year of the Almohad conquest of Marrakesh. The killing occurred during the initial consolidation, when ʿAbd al-Muʾmin's forces were eliminating potential centers of resistance across the newly conquered territories. Ibn al-Aṣamm belonged to the category of Sufis whose authority could not be co-opted because it had already been defined against the political order.
The Almohad state did not merely punish individual Sufis; it extended physical violence to their symbols. The sources confirm that it resorted to the method of assassinations and liquidation — uslūb al-ightiyālāt wa-l-taṣfiya — against Sufi figures whose resistance was deemed irrecoverable. The killing of Abū ʿAbd Allāh Muḥammad ibn al-Aṣamm was not an act of battlefield justice but a targeted elimination: a man whose spiritual authority among the people could neither be absorbed by the state nor tolerated outside it. The narrative preserved in al-Tashawwuf confirms the method with chilling economy: qutila ʿām 542 — "killed, year 542." No trial. No exile. No dungeon. Killed.
The revolt of Ibn Hūd at Ribāṭ Māssa — the event that, more than any other, hardened the Almohad posture toward Sufi institutions — reveals why the state treated ribāṭ-based authority as existentially threatening. Aḥmad ibn al-Ḥusayn ibn Qasī (d. 546/1151), who had transformed himself from a minor functionary into the leader of what the sources call ḥarakat al-Murīdīn — the Movement of the Disciples — launched a revolt whose organization was inseparable from its Sufi institutional base. The movement had been growing for some time, drawing support from the jamāʿa ṣūfiyya murtakiza — the established Sufi community rooted in the ribāṭ. Ibn Hūd's revolt at Māssa, supported by this same community, demonstrated to ʿAbd al-Muʾmin that ribāṭ-based spiritual authority and political rebellion were operationally identical. The ribāṭ was not merely a school or a retreat; it was a mobilization infrastructure whose shaykh commanded the loyalty of murīdīn whose obedience to him superseded their obedience to any temporal ruler. Dukkāla reinforced the lesson: a second revolt, crushed by Almohad forces, drew its organizational strength from the same ribāṭ networks — descendants of the ʿAyn al-Fiṭr tradition that had produced the chain reaching Abū Yaʿazzā and the Ḥarāzimī rābiṭa itself. The Almohad response was the imposition of murāqaba ṣārima — strict surveillance — on all ribāṭ activity across the empire, and the classification of the Sufis gathered around these institutions as aṣḥāb al-rukuwāt — "the People of the Genuflections" — a designation that had become, in the Almohad lexicon, a cipher for organized sedition.
But the Almohad apparatus did not confine itself to punishing obscure rural shaykhs and imprisoning provincial preachers. Its most revealing instrument was the forced summoning of the most prominent scholars and saints of the age to Marrakesh — the Almohad capital, built on Maṣmūda territory, designed to replace Fez as the center of gravity of Moroccan Islam. ʿAbd al-Muʾmin understood that spiritual authority dispersed across ribāṭs, rābiṭas, and provincial mosques was authority beyond his sight. The solution was concentration: bring the saints to the capital, where they could be watched, tested, and — if they submitted — absorbed into the Almohad order; if they resisted, broken.
The caliph summoned them in waves during the years following the conquest of Marrakesh in 541/1147. Al-Qāḍī ʿIyāḍ of Sabta — the greatest Mālikī jurist of the age, author of al-Shifāʾ, defender of the Almoravid creed with his life and his pen — was brought to Marrakesh not as a guest but as a prisoner of conscience. He had refused to recognize Almohad legitimacy, had publicly defended the Almoravid theological order, and had written in defense of Mālikī furūʿ against the Ashʿarī-Ghazālian synthesis the Almohads championed. His exile to Marrakesh was permanent. He died there — broken, displaced, far from his beloved Sabta — a monument to the cost of loyalty to a defeated creed.
Abū Bakr ibn al-ʿArabī al-Muʿāfirī — Sīdī ʿAlī ibn Ḥirzihim's own principal teacher, the man who had studied under al-Ghazālī, led the embassy to Baghdad, and returned as the most authoritative transmitter of the Niẓāmī synthesis in the western Islamic world — carried a wound in his bibliography that the Almohads would not forgive. His al-ʿAwāṣim min al-Qawāṣim, composed as a defense of the Companions against Shīʿī polemics, had overreached: in his zeal to vindicate Banū Umayya, he had written that al-Ḥusayn qutila bi-sayf jaddihi — "was killed by the sword of his grandfather" — a formula indistinguishable from the language of the Nawāṣib, those who made a creed of denigrating the Ahl al-Bayt. Worse, his defense had extended to diminishing Fāṭima al-Zahrāʾ herself. The Almohads — whose Mahdī claimed Prophetic descent and whose doctrinal system demanded absolute reverence for the Prophetic household — summoned him to Marrakesh and forced him to declare his innocence from the statement publicly. He recanted. He was released. But the humiliation was terminal. He did not return to Seville, nor regain his place in the scholarly apparatus he had once crowned. He was buried outside Bāb al-Sharīʿa — the opposite corner of Fez from his student Sīdī ʿAlī ibn Ḥirzihim at Bāb al-Futūḥ, master and disciple reunited in the soil of the city that had formed them both. In time, the city would claim them equally: Abū Bakr ibn al-ʿArabī would come to be counted among the Sabʿat Rijāl of Fez, his disgrace transfigured by centuries of veneration into the baraka of a man whom God had humbled before He raised him.
The case of Abū al-Qāsim al-Suhaylī (d. 581/1185) reveals another dimension of the Almohad management of scholarly authority. Al-Suhaylī — born near Málaga — was a grammarian, littérateur, and one of the most refined intellectuals of the western Islamic world: master of language, genealogy, prophetic biography, and Qurʾānic exegesis, whose al-Rawḍ al-Unuf became among the most influential commentaries on Ibn Hishām’s recension of the Sīra. Blind, ascetic, and intellectually formidable, he represented the Andalusian adab tradition at its highest level. Yet his significance under the Almohads lay precisely in his usefulness to their ideological project. Unlike al-Qāḍī ʿIyāḍ or Abū Bakr ibn al-ʿArabī, al-Suhaylī was not remembered as a public defender of Almoravid legitimacy, nor as a scholar whose writings endangered the sanctity-centered genealogy of the Almohad state. Instead, the Almohads incorporated him into Marrakesh as part of their broader effort to gather the symbolic capital of al-Andalus into the new imperial center. His presence illustrates that Almohad summonses were not exclusively punitive; they also functioned as acts of intellectual centralization. The caliphal capital sought to absorb every form of prestige — juridical, mystical, literary, genealogical — into a single ideological orbit revolving around the Mahdist state. In this sense, al-Suhaylī’s career stands beside the tragedies of al-Qāḍī ʿIyāḍ and Ibn al-ʿArabī as evidence that, after 541/1147, Marrakesh became not merely a political capital but a machine for reorganizing the entire hierarchy of western Islamic authority.
What ʿAbd al-Muʾmin intended as a policy of neutralization produced, over the following century, an unintended consequence of immense spiritual significance. These men — summoned, exiled, imprisoned, absorbed — did not disappear into Marrakesh. They died there. They were buried there. Their shrines accumulated baraka. And the city that had been built as a blank slate — Yūsuf ibn Tāshfīn's capital without memory, without Idrīsid claims, without competing sanctity — became, through the forced concentration of the Almohad period and its aftermath, the city of the Sabʿat Rijāl — the Seven Saints of Marrakesh. Al-Qāḍī ʿIyāḍ, Abū al-ʿAbbās al-Sabtī, Abul Qasim al-Suhayli among others — the men whom the Almohad state had gathered into its capital to contain them became, in death, the spiritual architecture of the city itself. The policy of repression produced the sacred geography it had sought to prevent. Marrakesh became holy not because the Almohads consecrated it but because the saints they had summoned consecrated it with their bones.
Al-ʿAbbās ibn Ibrāhīm al-Sabtī (d. 601/1204), the great ascetic and miracle-worker of Sabta, was drawn to Marrakesh — whether by summons or by the gravitational pull of a city that had become the forced gathering-point of Moroccan sanctity — and there he remained, building his legendary practice of charity and intercession within the walls of the Almohad capital. His career illustrates how the Almohad centralization of religious authority, after generations of summoning, displacing, and concentrating scholars and saints in Marrakesh, unintentionally prepared the conditions for a new public culture of sainthood to flourish. In this sense, the very process through which the Almohads gathered and reorganized the religious elites of the western Islamic world paved the way for men like Abū al-ʿAbbās al-Sabtī (d. 601/1204), to shine under Abū Yūsuf Yaʿqūb al-Manṣūr. Al-Sabtī’s model of sanctity — rooted in charity, public intercession, and popular devotion rather than doctrinal confrontation — could emerge as one of the defining religious phenomena of the age.
The case of Abū Yaʿazzā Yalannūr illustrates how these co-optive and precautionary strategies operated in tandem on a single figure — and how they failed. The caliph summoned Abū Yaʿazzā to Marrakesh in approximately 541/1146–1147. The summons itself was an assertion of temporal authority over a saint whose baraka the Maṣmūda population regarded as supreme. When Abū Yaʿazzā arrived, ʿAbd al-Muʾmin did not receive him with the deference due a walī; he subjected him to a theological test. The caliph turned his attention away from the great Amazigh saint and toward certain mujarriyīn — experimenters, religious provocateurs — from among the Imam al-Mahdī's companions, questioning them about the subtleties of tawḥīd. The intention was transparent: to determine whether the saint's knowledge conformed to Muwaḥḥid doctrine, to establish whether his authority derived from the same theological sources the state controlled, or from something the state could not reach.
The al-Mustafād preserves Abū Yaʿazzā's response through the testimony of those who witnessed it. When he was questioned, he answered with Qurʾānic verses — al-salaf bi-l-āyāt al-qurʾāniyya — deflecting the kalām examination with scripture, refusing to engage on the terrain the state had chosen. The examiner acknowledged his answers but could not classify them within the Muwaḥḥid framework: the saint spoke truth, but he spoke it in a register the state's theological apparatus could not process. More revealing was the exchange preserved through the ribāṭ tradition. When Abū Yaʿazzā was frequenting Ribāṭ Shākir around 560/1164, one of the attendants warned him: "Sīdī, Abū Mahdī! I have heard the murīdīn speaking ill of you." The head of the ribāṭ asked him plainly: "Do you not fear the sulṭān, if what is said about you reaches him?" Abū Yaʿazzā raised his head and replied: mā yanbaghī an yukhāfa illā min Allāh taʿālā — "One ought to fear none but God, exalted is He."
The statement was not defiance in the political sense — Abū Yaʿazzā was not organizing a revolt, commanding armies, or issuing counter-fatwās. It was something more dangerous: a declaration of ontological independence. The saint's fear belonged to God alone. The sulṭān, the Mahdī, the entire Almohad apparatus with its armies and its dungeons and its theological examinations — none of it registered on the scale of a man whose interior life was oriented exclusively toward the divine. This was the Almohad state's deepest problem with the awliyāʾ: not that they rebelled, but that they could not be frightened. A man who cannot be frightened cannot be governed. And a man who cannot be governed — who declares, publicly, that fear belongs to God alone — is a permanent demonstration that the state's authority has limits the state cannot acknowledge.
The Almohad response to Abū Yaʿazzā's immovable independence was not imprisonment but something more subtle and more revealing. The caliph allowed Abū Yaʿazzā to return to his mountain — but under surveillance. The saint's movements were monitored; his gatherings were observed; his influence was tracked through the network of Almohad ʿummāl stationed across the Atlas and its foothills. The state could not co-opt him — he would not adopt their protocol, would not address the caliph in their terms, would not submit his teaching to their doctrinal tests. But it could not afford to kill him either — his baraka among the Maṣmūda was too deep, his following too vast, the risk of creating a martyr too great. The solution was containment without confrontation: let the saint live, watch him breathe, and wait.
The violence the Almohad state could not safely deploy against Abū Yaʿazzā, it deployed freely against lesser figures. The sources preserve indicators that go beyond individual cases to suggest a systematic campaign. The state did not merely strike at individual Sufis who provoked it; it imposed murāqaba ṣārima on everyone suspected of taṣawwuf — monitoring their activities, their gatherings, their associations. The al-Mustafād records that the Almohad ʿāmil was tasked with maintaining a permanent watch over anyone whose spiritual authority might constitute an independent center of loyalty. The effect was chilling: Sufi practice did not disappear under the Almohads, but it retreated — into private homes, into rural margins, into territories like Bijāya where Almohad surveillance was less intensive. Abū Madyan's relocation to Bijāya was not exile but strategic withdrawal: the Ghawth of the Maghrib continued his work from a position beyond the immediate reach of the Almohad apparatus, building in Ifrīqiya what could no longer be built in Fez or Marrakesh.
And Sīdī ʿAlī ibn Ḥirzihim — the man at the center of the network the Almohads were dismantling — experienced the full weight of the precautionary strategy. The sources confirm his imprisonment in Fez — tamma sajnuhu fī madīnat Fās — by order of the Muwaḥḥid authorities, carried out by the Almohad governor Abū Muḥammad al-Jībiyānī, for reasons the primary texts do not fully clarify but that become legible within the broader pattern. He was not killed — his stature in Fez may have made that impossible, as it was impossible with Abū Yaʿazzā in the Atlas. But he was contained. The rābiṭa that had connected Baghdad to Dukkāla, the Qarawiyyīn to the ribāṭ, the Iḥyāʾ to the khalwa — the institution through which every major current of Moroccan Sufism had been gathered into a single node — was placed under the control of a state that could tolerate no node it did not own.
When we place Sīdī ʿAlī ibn Ḥirzihim's imprisonment alongside the cases documented in al-Mustafād — al-Khazrajī in chains for a khuṭba, Ibn al-Aṣamm killed in the year of conquest, Abū Shuʿayb al-Azmūrī monitored at Ribāṭ Shākir, the ribāṭ networks of Dukkāla and Māssa classified as seditious, Abū Yaʿazzā summoned and tested and released under permanent surveillance — what emerges is not a series of isolated incidents but a coherent apparatus of spiritual management. The Almohad state understood, with a clarity its Almoravid predecessor had lacked, that Sufi authority was not a theological problem but a political one — and that the solution was not doctrinal refutation but institutional absorption or physical elimination, applied case by case according to a calculus of risk the state alone controlled.
The consequences for the Ḥarāzimī rābiṭa were structural. The institution that had gathered every current of Moroccan Sufism into a single node could not survive intact under a regime whose defining principle was that no spiritual authority could operate outside the Mahdī's doctrinal perimeter. The rābiṭa did not disappear — it would reemerge, under Sīdī Muḥammad ibn Ḥirzihim, to direct al-Shādhilī toward Jabal al-ʿAlam — but it was forced underground, its public function suspended, its capacity to operate as an open crossroads of Sufi formation curtailed for the duration of the Almohad century. The organized ṭarīqa — the institution the Ḥarāzimī rābiṭa had been preparing Morocco to receive — would have to wait for the Marinids. And the man who had built the crossroads — the faqīh who burned al-Ghazālī and wept over him, the Malāmatī who mastered al-Muḥāsibī and trained Abū Madyan, the murabbī who defied the Almoravid sultan at Ibn Barrajān's funeral and then endured the Almohad sultan's prison — died in the last days of Shaʿbān, 559 or 560, having been punished by both regimes for the same offence: the exercise of an authority that answered to the Prophet ﷺ rather than to any throne.
7. The Legacy: What One Rābiṭa Built
Sīdī ʿAlī ibn Ḥirzihim predicted his own death. In the month of Shaʿbān before his passing, he told his students: "I will not fast with the people the great Ramaḍān that is coming." He was not ill. Three days before the end of Shaʿbān, he withdrew from his circle. On the last day of the month, he went to the ḥammām, performed wuḍūʾ, groomed himself, and said to the servants who had attended him: "I am separating from your service today." He entered his house, prayed two rakʿāt, and lay on his bed. When the time for Ẓuhr prayer came, his servant entered to wake him for the prayer and found him dead. May God have mercy on him and be satisfied with him.
He was buried in the cemetery of the poor — dafīn al-fuqarāʾ — a final Malāmatī gesture, the scholar-saint choosing the resting place of the destitute over any site of prestige. A qubba was raised over him. Later, the Marinid governor Muḥammad ibn Muḥammad al-Ṣaqqār ordered the qubba demolished and a greater one constructed — the magnificent stone structure that stands today outside Bāb al-Futūḥ, "a great qubba, spacious in courtyard, beautiful in form and construction," known across centuries for the answering of prayers and the fulfillment of needs. And it was beside this shrine — not beside al-Jazūlī in Marrakesh, not beside al-Ghazwānī, not beside al-Qāḍī ʿIyāḍ, not beside any saint of the Almoravid-Almohad capital — that Sultan Mawlāy al-Rashīd (r. 1075–1082/1664–1672), the founder of the ʿAlawī dynasty, chose to be buried after his death. The first ʿAlawī sultan who had consolidated Morocco under a single sharīfian throne, the man who had destroyed the Dilāʾiyya and Tāzarwalt, who had reunified the kingdom after decades of fragmentation — this sultan did not ask to rest in Marrakesh, the city of empires. He asked to rest in Fez, the city of saints. And in Fez, he asked to rest beside Sīdī ʿAlī ibn Ḥirzihim.
The choice was not sentimental. It was theological. Mawlāy al-Rashīd understood what every Moroccan who has visited that shrine understands: that Sīdī ʿAlī ibn Ḥirzihim was not merely one walī among the hundreds who populate Fez's sacred geography. He was the sultan of the awliyāʾ — the patron saint of the Idrīsid capital, the figure through whom Moroccan Sufism acquired its institutional form, the first man in the history of the Maghrib to embody in a single person what the Niẓāmī system had distributed across separate institutions. He was al-Ghazālī's fiqh made Moroccan. He was al-Suhrawardī's tarbiya made operational in Fez. He was Abū Bakr ibn al-ʿArabī's scholarly formation fused with Abū Yaʿazzā's rural baraka. He was the Qarawiyyīn and the ribāṭ in one body, the madrasa and the khalwa in one breath, the imām and the ʿārif and the murabbī in one man — and this had never happened before in the Maghrib.
Before Mawlāy ʿAbd al-Salām ibn Mashīsh was born, before al-Shādhilī climbed Jabal al-ʿAlam, before the Jazūliyya mobilized twelve thousand disciples under sharīfian command — before all of this, there was Sīdī ʿAlī ibn Ḥirzihim at Bāb al-Futūḥ, teaching the Iḥyāʾ to students who had to copy the entire text every year, mastering al-Muḥāsibī's Riʿāya so thoroughly that none matched him, introducing the Malāmatiyya to a land that had never heard of it, giving away his entire inheritance to the poor, refusing to approach the sultan, proclaiming himself Quṭb al-Maghāriba in defiance of Almoravid ethnoclassicism, and sending his servant into the streets of Marrakesh to curse anyone who failed to attend the funeral of a murdered saint. He was Morocco's first Sufi shaykh — not the first Moroccan to practice taṣawwuf, but the first to build the institutional framework through which taṣawwuf could be transmitted, systematized, and reproduced across generations.
Everything that followed passed through him. When Abū Madyan sat at his feet at the Qarawiyyīn and heard words that "came from the heart and entered the heart," the orphan from Cantillana received the formation that would make him the Ghawth of the Maghrib — the first Moroccan to claim the cosmic function of supreme spiritual support. When Abū Madyan fled to Bijāya and built Rābiṭat al-Zayyāt, he replicated the Ḥarāzimī model — a rābiṭa that combined juridical training with Sufi formation, legal credibility with charismatic authority. When Abū Muḥammad Ṣāliḥ al-Mājirī, trained at ʿAyn al-Fiṭr and in Bijāya under Abū Madyan, created the pilgrimage society that linked Morocco to Mecca, Medina, and Jerusalem through the funduqs and buyūt al-Maghāriba scattered across the eastern Islamic world, he was extending the network that the Ḥarāzimī rābiṭa had first created. When Sīdī Muḥammad ibn Ḥarāzim — his own son, raised by al-Mājirī after his father's death — directed Abū al-Ḥasan al-Shādhilī to Jabal al-ʿAlam to meet Mawlāy ʿAbd al-Salām ibn Mashīsh, the rābiṭa was still functioning as the compass of Moroccan Sufism, the institution that knew where each seeker should go and under whom each formation should occur. The Shādhiliyya — the ṭarīqa that would spread from Morocco to Egypt to the Levant to Southeast Asia, whose litanies are recited today in zawāyā from Fez to Jakarta — traces its pedagogical genealogy through Jabal al-ʿAlam, through the Ḥarāzimī rābiṭa, through the man buried outside Bāb al-Futūḥ.
And the Ḥarāzimī rābiṭa's function did not end with the Shādhiliyya. The Jazūliyya, the Darqāwiyya, the Wazzāniyya, the Kattāniyya — every major ṭarīqa that shaped post-medieval Morocco drew on methods, texts, and chains of transmission that passed, at some point in their genealogy, through the institutional node Sīdī ʿAlī ibn Ḥirzihim had created. His students' students' students would train al-Jazūlī at ʿAyn al-Fiṭr, and al-Jazūlī would compose the Dalāʾil al-Khayrāt — the most widely circulated devotional text in Islamic history — carrying the Ghazālian spirit of Prophetic love into a form accessible to any Muslim who could read. The text that the Almoravids burned at Bāb al-Futūḥ became, through six centuries of transmission originating at the same gate, the prayer book of the Islamic world.
His shrine is not a monument to the past. It is a living court — the court of men and jinn, a maqām where the seen and the unseen meet, where al-Khiḍr appeared to him during his teaching and appeared again, centuries later, to Mawlāy ʿAbd al-ʿAzīz al-Dabbāgh (d. 1131 /1719) at the same site. The Dabbāgh family has held the custodianship of this shrine since the early ʿAlawī period, binding the institutional Sufism that Sīdī ʿAlī ibn Ḥirzihim built to the eruptive, uninstructed walāya that al-Dabbāgh embodied. The shrine connects what the institutional model treats as separate: the shaykh who trained through silsila and the walī who received through fatḥ; the tarbiya of the Niẓāmī system and the kashf of the barzakh; the authority that is transmitted and the authority that arrives. Both found their place at Bāb al-Futūḥ. Both continue to operate there.
Those who visit the shrine today — and they come, as they have come for eight centuries, seeking healing, guidance, the answering of prayers, the resolution of what no human institution can resolve — enter a space that Sīdī ʿAlī ibn Ḥirzihim defined by everything he was: the Mālikī faqīh who mastered the law and then discovered that the law pointed beyond itself; the Malāmatī who invited blame and made his own humiliation a teaching instrument; the murabbī who formed Abū Madyan and through him the entire subsequent tradition of Moroccan Sufism; the political activist who defied sultans and dictated the terms of a dead saint's funeral in the sultan's own capital; and the man whose life demonstrated, before any other figure in Moroccan history, that fiqh, kalām, and taṣawwuf were not three disciplines but one pursuit — the pursuit that the Niẓāmī system had theorized in Baghdad and that he, alone among his contemporaries, made real in Fez.
Al-Tamīmī al-Fāsī placed his name first in the book. Mawlāy al-Rashīd placed his body beside his shrine. The people of Fez placed their prayers at his threshold. And Moroccan Sufism placed its entire subsequent history in the chain he began. He was the threshold — the figure through whom everything passed, and on the other side of whom everything became possible.
May God be satisfied with him and benefit us through his baraka.