In 651, Yazdegerd III was murdered by Mahuy Suri, the marzban of Marw. Tabaristan was afterwards invaded by the Muslim Arabs, who were defeated at the battle of Ruyan by the Zoroastrian Dabboyids. Farrukhzad, the previously minister of Yazdegerd, and ruler of Tabaristan, managed to repel the Arabs with the aid of Gil Gavbara and make a treaty with them.