Hasanwayh was the son of a certain Husayn and was from the
Kurdish tribe of Barzikani. By 961, Hasanwayh managed to capture several fortresses, thus starting the Hasanwayhid dynasty. He managed to successfully resist Sahlan ibn Musafir, the
Buyid governor of
Hamadan, and the Buyid
vizier,
Abu 'l-Fadl ibn al-'Amid. In 970 he reached a compromise with Abu 'l-Fadl's successor which guaranteed his autonomy in return for a tribute of 50,000
dinars. On September 16, 976,
Rukn al-Dawla, the Buyid ruler of
Jibal, died. After his death,
Izz al-Dawla, the Buyid ruler of
Iraq, prepared to take revenge against Rukn al-Dawla's son
Adud al-Dawla, who had tried to depose him. Izz al-Dawla made an alliance with
Fakhr al-Dawla, the brother of Adud al-Dawla and his father's successor to the territories in Hamadan. He also made an alliance with the
Hamdanids prevailing in northern Iraq, and with Hasanwayh. However,
Mu'ayyad al-Dawla, the third son of Rukn al-Dawla, remained loyal to Adud al-Dawla. Adud al-Dawla managed to defeat Izz al-Dawla and his allies. Hasanwayh then made peace with Adud al-Dawla, and was spared by him. Hasanwayh later died in 979 at Sarmaj, located in the south of
Bisitun. A civil war shortly ensued among his sons, while the Buyid civil war continued between Adud al-Dawla and Fakhr al-Dawla. Adud al-Dawla emerged victorious, and expelled Fakhr al-Dawla from the Buyid territories. Adud al-Dawla then had all Hasanwayh's sons executed, except one named
Badr ibn Hasanwayh, whom he appointed ruler of the Hasanwayhid dynasty. == Sources ==