Hasanwayh (also spelled Hasanuya), also known as Abu'l-Fawaris, was the Kurdish 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.
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.
- Bosworth, C. E. (1975). "Iran under the Buyids". In Frye, R. N. (ed.). 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.