sentences:  We know that they were related to the Ziyarid dynasty, through the marriage of Mardanshah, the father of Ziyar, to the daughter of one of the Bavandi kings.The prominence of the Bavandi kings apparently continued throughout the Seljuq and Mongol period.One of their greatest kings, Shah Ghazi Rustam, is reported to have seriously defeated the Ismailis who were gaining prominence in Tabaristan and to have made significant progress in consolidating power in the Caspian provinces.