 Vushmgir was shortly defeated, losing Ray for good.He then returned to Tabaristan, but was defeated there by al-Hasan, who had previously occupied Gorgan.Voshmgir fled to the court of the Bavandid Shahriyar II, and then to the court of the Samanid Nuh I, where he was treated well.