 The second major domestic campaign was against another autonomous ruler , Mazyar of the <unk> dynasty in Tabaristan . Tabaristan had been subdued in 760 , but Muslim presence was limited to the coastal lowlands of the Caspian Sea and their cities , while the mountainous areas remained under native rulers — chief among whom were the <unk> in the eastern and the <unk> in the central and western mountain ranges — who retained their autonomy in exchange for paying a tribute to the Caliphate . With the support of al @-@ Ma 'mun , Mazyar had established himself as the de facto ruler of all Tabaristan , even capturing the Muslim city of Amul and imprisoning the local Abbasid governor . Al @-@ Mu 'tasim confirmed him in his post on his accession , but trouble soon began when Mazyar refused to accept his subordination to the Tahirid viceroy of the east , Abdallah ibn Tahir , instead insisting on paying the taxes of his region directly to al @-@ Mu 'tasim 's agent . Tension mounted as the Tahirids encouraged the local Muslims to resist Mazyar , forcing the latter to adopt an increasingly confrontational stance against the Muslim settlers and turn for support on the native Iranian , and mostly Zoroastrian , peasantry , whom he encouraged to attack the Muslim landowners . Open conflict erupted in 838 , when his troops seized the cities of Amul and Sari , took the Muslim settlers prisoner , and executed many of them . The Tahirids in return invaded Tabaristan and in 839 captured Mazyar , who was betrayed by his brother <unk> . <unk> then succeeded his brother as a Tahirid appointee , while Mazyar was taken to Samarra , where he was flogged to death the next year . While the autonomy of the local dynasties was maintained in the aftermath of the revolt , the event marked the onset of the country 's rapid Islamization , including among the native dynasties . 
