Qom and Rayy The possibly autobiographical information found in
Sargozasht-i Seyyednā is the main source for Hasan's background and early life. According to this, Hasan al-Sabbāh was born in the city of
Qom,
Persia in the 1050s to a family of
Twelver Shia. one of the first centres of Arab settlement in Persia and a stronghold of Twelver Shia. Early in his life, his family moved to
Rayy. The Persian Isma'ilis supported the ''da'wa'' ("mission") directed by the
Fatimid caliphate of
Cairo and recognized the authority of the Imam-Caliph
al-Mustansir (d. 1094), though
Isfahan, rather than Cairo, may have functioned as their principal headquarters. The Ismā'īlī mission worked on three layers: the lowest was the ''
fida'i or foot soldier,
followed by the rafīk
or comrade, and finally the dā‘ī'' or missionary. It has been suggested that the popularity of the Ismā'īlī religion in Persia was due to the people's dissatisfaction with the
Seljuk rulers, who had recently removed local rulers.
Conversion to Ismailism and training in Cairo At the age of 17, Hasan converted and swore allegiance to the Fatimid caliph in Cairo. Hasan's studies did not end with his crossing over. He further studied under two other
dā‘is, and as he proceeded on his path, he was looked upon with eyes of respect. Hasan's austere and devoted commitment to the ''da'wa'' brought him in audience with the chief missionary of the region:
'Abdu l-Malik ibn Attash. Ibn Attash, suitably impressed with the young seventeen-year-old Hasan, made him Deputy Missionary and advised him to go to Cairo to further his studies. However, Hasan did not initially travel to Cairo. Some historians have postulated that Hasan, following his conversion, was playing host to some members of the Fatimid caliphate, and this was leaked to the anti-Fatimid and anti-Shī‘a
vizier Nizam al-Mulk. This prompted his abandoning Rayy and heading to Cairo in 1076. Hasan took about 2 years to reach Cairo. Along the way he toured many other regions that did not fall in the general direction of Egypt. Isfahan was the first city that he visited. He was hosted by one of the Missionaries of his youth, a man who had taught the youthful Hasan in Rayy. His name was Resi Abufasl and he further instructed Hasan. From here he went to Arran (current Azerbaijan), hundreds of miles to the north, and from there through Armenia. Here he attracted the ire of priests following a heated discussion, and Hasan was thrown out of the town he was in. He then turned south and traveled through Iraq, reached
Damascus in Syria. He left for Egypt from
Palestine. Records exist, some in the fragmentary remains of his autobiography, and from another biography written by
Rashid-al-Din Hamadani in 1310, to date his arrival in Egypt at 30 August 1078. It is unclear how long Hasan stayed in Egypt: about 3 years is the usually accepted amount of time. He continued his studies here, and became a full missionary.
Return to Persia Whilst he was in Cairo, studying and preaching, he incurred the displeasure of the Chief of the Army,
Badr al-Jamalī. This may have been a result of the fact that Hasan supported Nizar, the Ismaili Imam-Caliph
al-Mustanṣir's elder son, as the next Imam. Hasan was briefly imprisoned by
Badr al-Jamali. The collapse of a minaret of the jail was taken to be an omen in favor of Hasan and he was promptly released and deported. The ship that he was traveling on was wrecked. He was rescued and taken to Syria. Traveling via
Aleppo and
Baghdad, he terminated his journey at
Isfahan in 1081. Hasan's life now was totally devoted to the mission. Hasan toured extensively throughout Persia. In northern Persia, touching the south shore of the
Caspian Sea, are the mountains of
Alborz. These mountains were home to a people who had traditionally resisted attempts by both Arabs and Turkish subjugation; this place was also a home of Shia leaning. The news of this Ismā'īlī's activities reached Nizam al-Mulk, who dispatched his soldiers with the orders for Hasan's capture. Hasan evaded them, and went deeper into the mountains. ==Capture of Alamut==