Despite his successes, Afshin's star began to decline, apparently as a result of his jealousy towards `Abdallah bin Taher, the governor of Khorasan who Afshin apparently regarded as an upstart and a rival for power in Transoxania. Afshin had begun intriguing with Mazyar, a Karenid prince and "ispahbadh" of Tabaristan in the Caspian region. Afshin allegedly encouraged Mazyar in secret, in the hope that `Abdallāh bin Tāher would be deprived of his governorship allowing Afšīn to take over the governorship. Mazyar's rebellion was quashed in 839 and Afshin's position became increasingly difficult, which caused Afshin to fall from favour. His situation was made worse by the finding of correspondence between him and Mazyar. Further, the Khurasanian governor, Abdallah ibn Tahir, alleged that he had intercepted some of Babak's wealth Afshin had obtained in the earlier campaign and was seeking to transfer secretly to Afshin's lands in Oshrusana. When Mazyar arrived in Samarra, Afshin was arrested.