Maziar, son of Qarin, was one of the descendants of Sukhra, son of Vandad, son of Karen, son of Sukhra the Great. Maziar belonged to the Qarinvand dynasty. This dynasty ruled independently in the mountainous regions of Tabarestan, long before the defeat of the Sasanians. The rulers of this dynasty called themselves Gershah or Espahbod. Maziar went to the court of Ma'mun Abbasid, converted to Islam and was named Mohammad. With the order and support of the Abbasid caliph, he declared all of Tabarestan and Royan as his territory and called himself the undisputed ruler of Gilan and Tabarestan and assumed the titles of Gil-Gilan and Espahbod-Espahbodan. He also called himself Padishkhwargarshah as the title was usual during the Sasanian era. Maziar ruled over Tabarestan from 208 until 225 AH. In 224 AH, he rebelled against the Abbasid caliph. Maziar was arrested due to the betrayal of his brother Kuhyar and was sent to Samera. After severe torture, Maziar was executed.