Isfahan in 938. In 939 or 940 the Samanid governor Abu 'Ali Chaghani attacked Gorgan; Vushmgir sent Makan aid, but the city fell after a long siege. Abu 'Ali Chaghani then engaged Vushmgir in battle in Ray and defeated him, killing Makan in the process. Vushmgir fled to Tabaristan, but was faced there with a revolt by his governor of Sari, al-Hasan ibn al-Fairuzan, who was a cousin of Makan and blamed the Ziyarid for his death. Vushmgir defeated him, but al-Hasan convinced Abu 'Ali Chaghani to invade Tabaristan. Vushmgir was forced to recognize Samanid authority again. Hasan furthered the Ziyarid's troubles by retaking Isfahan in 940. When Abu 'Ali Chaghani left for Samanid-held Khurasan, Vushmgir retook control of Ray. He then lost it for good in 943, to the Buyid Hasan. Returning to Tabaristan, he was defeated there by al-Hasan, who had previously occupied Gorgan. Vushmgir fled to the Bavandids of the mountains in eastern Tabaristan, then to the court of the Samanid Nuh I. Al-Hasan meanwhile allied with Hasan, but when Ibn Muthaj took Ray from the Buyids in 945, he recognized Samanid authority. Still, in 945 Vushmgir captured Gorgan with Samanid support, but did not manage to retain his rule there. It was only in 947 when he was able to take Gorgan and Tabaristan from al-Hasan with the help of a large Samanid army. In 948 Hasan (who since the Buyids' entrance into Baghdad in 945 had used the title Rukn al-Dawla) invaded Tabaristan and Gorgan and took them from Vushmgir. While al-Hasan supported the Buyids, Vushmgir relied on his Samanid allies. Tabaristan and Gorgan changed hands several times until 955, when in a treaty with the Samanids, Rukn al-Daula promised to leave Vushmgir alone in Tabaristan. Peace between the two sides did not last long, however since in 958 Vushmgir briefly occupied Ray, which was Rukn al-Dawla's capital. Rukn al-Dawla later made a counter-attack, temporarily taking Gorgan in 960, then taking both Tabaristan and Gorgan for a short time in 962. He may have also taken Tabaristan and Gorgan in 966, but did not hold on to them for long. Reign of Qabus 970s–990s Vushmgir was killed by a boar during a hunt in 967, shortly after a Samanid army had arrived for a joint campaign against the Buyids. He was succeeded by his eldest son Bisutun. However, the Samanid army favored another son, Qabus,