 However, he later fell out of favor and was executed by hanging during the reign of Mahmud's son Mas'ud I. Hasanak's official charge was infidelity which was a politically motivated charge, and his execution was ordered by the Abbasid caliph of Baghdad.Hasanak was the son of a certain Abbas, and was a member of the Mikalid family, an Iranian family which traced its descent back to the Sogdian king Divashtich, and to the Sasanians.Not much is known about Hasanak's early life, except that at a young age he served as the governor of Khorasan.