 He also served as the "rais" of his native city, Nishapur.Later in 1023, Hasanak went to a pilgrimage in Mecca, and later went to Fatimid Egypt, where he was treated with honor by the Fatimid caliph Ali az-Zahir.However, Hasanak's relations with the Fatimids made the Abbasid caliph al-Qadir distrust him of being a believer of Shia Islam, which was seen as a heretical faith by the Sunni Abbasids and other Sunni Muslims.