 In 939, Muhammad became ill and Abu Ali was assigned to succeed him in his posts.As governor of Khurasan he undertook several campaigns in northern Iran, conquering Gurgan and territory as far west as Ray from the Ziyarids, forcing the Ziyarids to acknowledge Samanid authority, and killing the Dailamite adventurer Makan ibn Kaki.After he departed for Khurasan the Buyid Rukn al-Dawla seized Ray.