Hasanwayh, also known as Abu'l-Fawaris, was the founder of the Hasanwayhid dynasty, ruling from 961 to 979.
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 as the ruler of Iraq.
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, however, 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 south of Bisitun. A civil war shortly ensured between his sons, while the civil war among the Buyids continued with Adud al-Dawla and Fakhr al-Dawla. Adud al-Dawla managed to emerge victorious, and repelled Fakhr al-Dawla from Buyid territories. Adud al-Dawla then had all Hasanwayh's sons executed, except one named Badr ibn Hasanwayh, whom Adud al-Dawla appointed as the ruler of the Hasanwayhid dynasty.
- Bosworth, C. E. (1975). "Iran under the Buyids". In Frye, R. N. The Cambridge History of Iran, Volume 4: From the Arab Invasion to the Saljuqs. Cambridge: Cambridge University Press. pp. 250–305. ISBN 0-521-20093-8.
- Ch. Bürgel and, R. Mottahedeh (1988). "ʿAŻOD-AL-DAWLA, ABŪ ŠOJĀʾ FANNĀ ḴOSROW". Encyclopaedia Iranica, Vol. III, Fasc. 3. London u.a.: Routledge & Kegan Paul. pp. 265–269.
Badr ibn Hasanwayh