Nuh had previously supported Vushmgir; the latter had gained possession of Gurgan for a short time with Samanid support, and after losing it to the Buyids, he used a Samanid army to take back Gurgan and Tabaristan in 947. The Ziyarids, along with the Samanids, and the Buyids subsequently fought over the region for the next few years, each side gaining temporary control of the area several times. Vushmgir, who was an ally of the Samanids, had been pleased when Abu 'Ali had gone to war against the Buyids, but was angered when Abu 'Ali made peace with the Buyids of Ray.