|'Ispahbadh of the Bavand dynasty|
In 760, during the reign of Sharwin's father Surkhab II, Khurshid, the head of the Dabuyid dynasty that had ruled Tabaristan since the Muslim conquest of Persia, revolted against the Abbasid Caliphate. Khurshid was defeated and poisoned himself after learning that his family had been captured by the Abbasids. This marked the end of the Dabuyid dynasty, but other minor dynasties in the region such as the Bavandids, Karenids and Zarmihrids, who were all formerly subject to the Dabuyids, continued to control parts of Tabaristan as tributary vassals of the Abbasid government.
In 772, Surkhab II died, and was succeeded by Sharwin I. During the same period, Khalid ibn Barmak, the Abbasid governor of Tabaristan, left the region. Shortly after Khalid's departure, the Karenid ruler Vandad Hormozd sent Sharwin a letter which urged him to revolt against the Abbasids. Sharwin accepted, and along with Vandad Hormozd and the Zarmihrid ruler revolted against the Abbasids. Sharwin then began destroying the cities built by the Muslims in the region, and in 782, along with Vandad Hormozd, exterminated all the Muslims in Tabaristan. During the same period, the Karenids assumed the former Dabuyid title of Gilgilan, while Sharwin assumed the title of Padashwargarshah ("King of the Mountains").
Sharwin and the other rulers of Tabaristan managed to repel several Arab invasions of Tabaristan, until they were finally defeated in 785, and once again agreed to pay tribute to the Abbasid caliphs.
In 805, the Abbasid caliph Harun al-Rashid visited Ray where he met Sharwin and Vandad Hormozd, who reaffirmed their submission to him and promised to pay tax. In order to ensure their loyalty, Harun took Sharwin's grandson Shahriyar I and Vandad Hormozd's son Karin as hostages to Baghdad. The two princes were allowed to return to Tabaristan after Harun's death four years later.
Sharwin died in 817, and was succeeded by his grandson Shahriyar I.
- Madelung (1975), p. 200
- Pourshariati (2008), p. 317
- Ibn Isfandiyar, p. 128-132
- Madelung (1975), p. 201
- Madelung (1984), pp. 747–753
- Madelung (1975), p. 204
- Madelung, W. (1975). "The Minor Dynasties of Northern Iran". In Frye, R. N. The Cambridge History of Iran, Volume 4: From the Arab Invasion to the Saljuqs. Cambridge: Cambridge University Press. pp. 198–249. ISBN 978-0-521-20093-6.
- Madelung, W. (1984). "ĀL-E BĀVAND (BAVANDIDS)". Encyclopaedia Iranica, Vol. I, Fasc. 7. London u.a.: Routledge & Kegan Paul. pp. 747–753. ISBN 90-04-08114-3.