With the aid of Abbasids and Tahirids, however, Qarin managed to reclaim his domains from Mazyar.
Popular resentment of the Tahirids' rule increased through the oppression of their officials, especially their fiscal agents in the province.
Consequently, in 864 a rebellion broke out in the towns of Ruyan, Kalar and Chalus, led by two "sons of Rostam".
The rebels called upon Hasan ibn Zayd, an Alid, to lead them, and allied themselves with the neighbouring Dailamites.
Hasan, who assumed the regnal name al-Da‘ī ila’l-ḥaqq ("He who summons to the Truth"), was recognized as emir by a part of the local population, and even secured the allegiance of the Justanid king of Daylam, Vahsudan ibn Marzuban.