Muhammad ibn Abdallah was reconfirmed in his old offices, and received in addition the governorship of Mecca and Medina.[1][5] The next years were troubled for the Caliphate as it entered a period of domestic instability that paralysed its government.[6] Riots broke out in Baghdad in 863 on the news of a major Byzantine victory against the Muslims, which necessitated the intervention of Turkish troops before they could be suppressed,[1] while in 864, Muhammad ibn Abdallah had to suppress an Alid uprising that broke out in Kufa under Yahya ibn Umar, who defeated the first army sent against him before being encircled and killed by the general Husayn ibn Isma'il in August.[1][5] Iraq Ajami, along with the provinces on the southern shore of the Caspian Sea, also came under Muhammad ibn Abdallah's jurisdiction. In the latter, Gurgan and Tabaristan, he had appointed his brother Sulayman, whose administration was so oppressive that the local people rose in revolt in 864 and invited another Alid, Hasan ibn Zayd, to lead them. Although Tahirid forces managed to defeat the initial uprising and drive Hasan and his supporters to the mountains of Daylam, in the early 870s he managed to recover Tabaristan, establishing an independent Alid dynasty in the region.[7][1] In Arabia too, Alid elements used the turmoil in Iraq to rise in revolt: in 865, an Alid named Isma'il ibn Yusuf plundered both Mecca and Medina, killing so many of the pilgrims who had gathered there for the hajj, that he was nicknamed al-Saffak, "the Bloodshedder".[1]