“I studied the exoteric sciences, devoting thirty years to their study, until I had mastered them and was proficient in them,” says the great imam and scholar Muhammad ibn Ali as-Sanusi.
He had studied in Algeria with local teachers, before moving to Fez where he studied for 15 years. While in Fez, he took the Shadhiliyya Nasiriyya, an elite branch of the Shadhili tariqa that is given only to scholars. He also studied with the greatest spiritual masters of those lands like Shaykh al-Darqawi. But the shaykh felt that he had not yet found his long-sought goal, the supreme Sufi master whom he had always sought, but not yet found or encountered.
He traveled to the east and studied two or three years in Cairo. He looked for his spiritual guide in Cairo, but a hidden wali, unknown to him, spoke to him by name and said, “The man you want is in Mecca and you must go there to meet him.”
So he continued to Mecca to perform the pilgrimage, and there he saw the sayyid Ahmad ibn Idris.
“I listened to his lectures on the exoteric and esoteric sciences- his discernment was unparalleled and was confirmed for every science. But I did not accept him for not following the madhhabs. I said to myself: He is a Kharijite! Then I saw the Prophet (may Allah bless him and grant him peace) one night.”Oh Messenger of Allah, I request of you the illumination”.
He (may Allah bless him and grant him peace) said: “Your illumination will be at the hands of Ahmad ibn Idris.”
But when I awoke, I was doubtful and concealed my vision, telling no one about it. Then I saw the Prophet (may Allah bless him and grant him peace) a second time and again I sought the illumination from him, but he answered as he had the first time. Then I saw him (may Allah bless him and grant him peace) a third time and he said to me: “Your illumination will be at the hands of Ahmad b. Idris.”
So I said to myself “Should I not seek from him the knowledge of the Way, since this is something different from the madhhabs”? Then I went to him in order to listen carefully to the lessons in the exoteric sciences. I had sat down in front of him when he said to me:
‘O Muhammad, is not the vision that you saw once, twice, and a third time sufficient for you?’
He then laid bare to me my innermost heart before I had said a word to him. On that day I submitted to him and received from his hands the Way of the People of Allah.”
Taken from R.S. O’Fahey, Enigmatic Saint, with some modifications.