Hasanids

The Hasanids (بنو حسن 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).

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. after the suppression of the latter, a Hasanid branch, the Idrisids, settled in northern Morocco.

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.

Dynasties
Notable Ḥasanid dynasties in the Muslim world include:
 * Alawite dynasty of Morocco
 * Alavid dynasty of Tabaristan
 * Banu Ukhaidhir of Central Arabia
 * Bolkiah dynasty of Brunei
 * Hammudid dynasty of Southern Spain
 * Idrisid dynasty of Morocco
 * the various dynasties providing the Sharifs of Mecca; including the Hashemites (Banu Qatadah) of the Hejaz, Syria, and Iraq, now ruling only in Jordan
 * Rassid dynasty of Yemen
 * Saadi dynasty of Morocco
 * Senussid dynasty of Algeria and Libya
 * Sulaymanids of Mecca, Jizan, and Yemen
 * Sulaymanid dynasty of Western Algeria