As a young man he was attracted to the study of various sciences and philosophy as well as that of other religions, which remained a major concern for him throughout his life. He entered government service early on and rose to high positions that allowed him to enjoy the life at court, but at the age of forty-two, his life was transformed by a dream admonishing him, ordering him to awake from the life of forgetfulness and journey to Mecca. Following the directives of the dream, he set out immediately for Mecca in December 1045. The transforming experience of this journey was to come, however, in Egypt, where he formally embraced Ismaili Shi'ism. Remaining in Cairo for six years, he received the title of lJ,ujjat ("proof') before leaving as Isma 'TIl "missionary" (dii 'l) to Khorasan.