The Hasanids (Arabic: بنو حسن, romanized: Banū Ḥasan or حسنيون, Ḥasaniyyūn) are the descendants of Hasan ibn Ali, brother of Husayn ibn Ali and grandson of Muhammad. They are a branch of the Alids (the descendants of Ali ibn Abi Talib), and one of the two most important branches of the ashrāf (the other being the descendants of Hasan's brother Husayn, the Husaynids).[1]
Unlike the Husaynids, who accommodated themselves with the Abbasids, the Hasanids insisted on challenging the Abbasids' right to lead the Muslim world, launching unsuccessful revolts in 762 and 786.[2] after the suppression of the latter, a Hasanid branch, the Idrisids, settled in northern Morocco.[3]
In Morocco, the term Hasani is particularly applied to the descendants of Muhammad al-Nafs al-Zakiyya, to distinguish them from the Idrisids. The Moroccan Hasanids proper have produced two dynasties, the Saadi dynasty and the Alawite dynasty, which still reign over the country.[1]