The Hasanids (Arabic: بنو حسن, romanized: Banū Ḥasan or حسنيون, Ḥasanīyyūn) are the descendants of Hasan ibn Ali, a grandson of the Islamic prophet Muhammad. They are a branch of the Alids (the descendants of Ali ibn Abi Talib), and along with the Husaynids, they form the ashraf.
In Morocco, the term is particularly applied to the descendants of Muhammad al-Nafs al-Zakiyya, to distinguish them from the Idrisid dynasty, which is also of Hasanid descent. The Moroccan Hasanids proper have produced two dynasties, the Saadi dynasty and the Alaouite dynasty, which still reigns over the country.
Notable Hasanid dynasties include:
- Alaouite dynasty of Morocco
- Banu Ukhaidhir in central Arabia
- Idrisid dynasty of Morocco
- the various dynasties providing the Sharifs of Mecca; including the Hashemites of the Hejaz, Syria, and Iraq, now ruling only in Jordan
- Rassid dynasty of Yemen
- Saadi dynasty of Morocco
- Sulaymanids of Yemen
- Bolkiah dynasty of Brunei
- Deverdun 1971, p. 256.