Upon the death of Sidna al-Imam Moulay Idriss II, he left twelve sons, who were sent throughout Morocco by their grandmother Kanza to proliferate the Idrissi-Hassanid sharifism. One Idrissite imam, however, became through his descendents an important figure in the development of the sharifian paradigm of sainthood. Moulay Ali 'Haydara, a grandson of Moulay Idriss II, received the bay'a as Imam and ruler of Fez in 221/836. when he failed to designate his infant son Moulay Ahmed Mizwar as his successor before his own death in 234/849, the Idrissite imamate passed into the hands of his cousins, the descendents of Moulay Omar ibn Moulay Idriss II, who lived in the regions of Habt and Ghumara in northern Morocco. After being passed over for the imamate, Moulay Ahmed Mizwar became disenchanted with politics and devoted himself to a life of worship and asceticism. Sometime before the turn of the tenth century, or just before the Idrissite state became a bone of connection between the Fatimids of Ifriqiya and the Umayyads of Spain, he moved from Fez to northern Morocco and established himself at Hajar an-Nasr (Escarpment of the Eagle), a fortes situated in the Habt region among the Sanhaja Berber tribes of Ahl Sarif, Banu Yusuf, and Sumata.
As his nickname, Mizwar (Berber. lion or leader) implies, this great grandson of Moulay Idriss II was adopted as a spiritual leader by the tribes who lived near his mountaintop stronghold. According to local tradition, when the chiefs of these tribes asked Moulay Ahmed Mizwar to delegate a member of his family to join them and favour them with the baraka of the Prophet Sidna Mohammed (peace and blessing be upon him) he chose his son Abdessalam (known locally as "Sidi Sellam"). As a means of honouring the young sharif, who had recently married, the tribesman renamed themselves "Banu Arus" (Sons of the Bridegroom), the appellation by which they are known today. For the next seven generations, the descendents of Sidi Sellam established themselves among the Berbers of Banu Arus while maintaining a reputation for holiness that was based almost exclusively on their Hassanid descent. Around the year 530/1135-6, a child named Slimane, but later named "Mashish" (Ber. Little Cat"), was born to a sharif of the Bani Arus known as Abu Bakr ibn Ali. Upon reaching maturity, Slimane Mashish withdrew from the world as an ascetic and built a hermitage that still stands among the ruins of his natal village of Aghyul. In either 559/1146 or 563/1148, he sired a son named Moulay Abdessalam, who would become the patron saint of Moroccan Sufism. According to sources, Moulay Abdessalam became a Fool of God (Majdoub) at the age of 7, when a man, with righteousness on his face, entered on him to a cave and said: "I am your master who initiate you (amudduka)".
Mawlana Abu Mohammed Moulay Abdessalam Ben Mashish lived for sixty-three years, the same lifespan as the of the prophet Sidna Mohammed, peace and blessing be upon him. During this period, his career passed through three distinct faces. First, he was a scholar and studied the Quran and Maliki jurisprudence under the Idrissite sharifs of Banu Arus in addition to prominent Sufi-scholars such as Sidi Salem of Qabilat Bani Yusuf and sharif Sidi al-Hajj Ahmed Aqatran Asalani of Qabilat Bani Abraj, near modern Taza. Later, he was a mujahid, a defender of the faith, and lived in Sabta, where he supported himself by teaching Quranic recitation to children and fought with the Almohad army in al-Andalus. Finally, after embracing Sufism, he devoted the last twenty years of his life to worship and contemplation on the heights of Jabal al-Alam (Flag Mountain), a period which culminated in his encounter with his only disciple, the fellow Idrissite and founder of the Shadhiliya Sufi order, Sidi Abul Hassan Shadhili (d. 656/1241). Moulay Abdessalam was martyred in 622/1207 after the Spanish, led by their missionary Ibn Abi Tawajin Laktami, headed to Jabal al-Alam and killed the Shaykh in the very place where he initiated Abul Hassan Shadhili. His tomb on Jabal al-Alam is the first visited shrine in Northern Morocco.
Shaykh Moulay Abdessalam's master of Sufism was the Idrissite sharif Sidi Abderrahman ibn al-Hussein al-Attar, a spice merchant from the city of Sabta, who was called "az-Zayyat" or "al-Madani" because he resided in the oil sellers' quarter of Medina (where his tomb is still found) while devoting himself to worship at the Prophet's mosque. Sidi al-Madani's spiritual master was Sidi Tuqiyudin al-Fuqayyir, who hailed from the Iranian city of Nahrawan but lived near Wasit in Iraq, the home city of Sidi Abul Fath al-Wasiti (d. 642/1227). Sidi Tuqiyudin apparently had two spiritual lineages: one involving an Iraqi line that is commonly cited as the main silsila in Morocco, whose chain of transmission comes from Sidna al-Hassan ibn Ali, and another, now forgotten leading to Sidi Ahmed ar-Rifa'i (d. 678/1236). Another of Sidi al-Madani's spiritual masters is the Andalusian mystic Sidi Abi Mohammed Jaafar ibn Abdellah ibn Sayyid Buna al-Khuza'i who took from the Patron Saint of the Maghreb Shaykh Sidi Abu Madyan Shuayb al-Ghawt (d. 594/1179).
The "Mohammedian" focus of al-Madani's spirituality was passed on by Moulay Abdessalam to Abul Hassan, who once stated: "Were the Prophet to be veiled from me for but the blink of an eye, I would not count myself among the Muslim." The Mohammedianism of Moulay Abdessalam's teaching also appears in his tasliya prayer ("Salat al-Mashishiya") on the Prophet (peace and blessing be upon him) a metaphysical paraphrase in which the believer calls on God to bless the Prophet, peace and blessing be upon him. Moulay Abdessalam sees in Sidna Mohammed an expression of the one Spirit from which all revelation comes and which is the eternal mediator between the ungraspable Godhead and the world. This is the Logos, the first manifestation of God and, as such, His universal symbol as well as His highest veil. By the very fact that in this way the Absolute reveals itself in a relative and multiple fashion, at also conceals itself. This eternal mediator is called the 'Mohammedian Spirit' (ar-Ruh al-Mohammedi), not because it is embodied only in Sidna Mohammed, peace and blessing be upon him—for all God's messengers and prophets manifest it—but because he is its most immediate expression.