The Alids are those who claim descent from the family of ʿAlī ibn Abī Ṭālib (; 600–661 CE), the fourth rāshidūn caliph (r. 656–661) and the first Imam of Islam—cousin, son-in-law, and companion (ṣaḥāba) of Muhammad—through all his wives. The main branches are the (including the Ḥasanids, Ḥusaynids, and Zaynabids) and the Alawids. History Primarily Sunnī Muslims in the Arab world reserve the term sharīf or sherīf for the descendants of Ḥasan ibn ʿAlī, while the term sayyid is used for the descendants of Ḥasan's brother, Ḥusayn ibn ʿAlī. Both Ḥasan and Ḥusayn were grandchildren of Muhammad, through the marriage of his cousin ʿAlī ibn Abī Ṭālib and his daughter Fāṭimah. Ever since the post-Hashemite era began, the term sayyid has been used to denote descendants from both Ḥasan and Ḥusayn. Arab Shīʿa Muslims use the terms sayyid and habib to denote descendants from both Ḥasan and Ḥusayn; see . Lines There are several dynasties of Alid origin in the Muslim world. All of them exist under two main branches, the Ashrāfites and Alawids: ʿAlī ibn Abī Ṭālib: Ashrāfites/Sayyids, descendants of Muhammad through the marriage of his cousin ʿAlī and his daughter Fāṭimah: Ḥasan ibn ʿAlī and Ḥusayn ibn ʿAlī, grandsons of Muhammad Zayd ibn Ḥasan Ḥasan ibn Zayd of the Zaydid dynasty of Tabaristan (Alavids) Ḥasan al-Muthanna ibn Ḥasan Abdullah al-Kamil ibn Ḥasan al-Muthanna Musa al-Jawn ibn Abdullah al-Kamil Abdullah II ʿAbdul Qādir Gīlānī, founder of the Qadri Sufi Order Nazim Al-Haqqani, founder of the Naqshbandi Haqqani Sufi Order (Osmanli Dergah) Ibrahim ibn Musa al-Jawn Muhammad ibn Yusuf al-Ukhaidhir ibn Ibrahim of the Ukhaydhirite dynasty of al-Yamama Abdullah al-Salih ibn Musa al-Jawn Musa al-Thani ibn Abdullah al-Salih Banu Qatadah/Hashemites Sharifs of Mecca Kings of Jordan Kings of Iraq Kings of Hejaz Kings of Syria Sulayman ibn Abdullah al-Salih of the Sulaymānid Sharifs of Mecca and Jizan Ja'far ibn Abdullah al-Kamil of the Sharifs of Sousse, Tunisia Muhammad al-Nafs al-Zakiyya ibn Abdullah al-Kamil of the Alawite dynasty of Morocco Saadid dynasty of Morocco Idris al-Akbar ibn Abdullah al-Kamil of the Idrisid dynasty of Morocco Hammudid dynasty of Algeciras, Málaga, Seville, and the Emirate of Granada Senussids of Libya Sulayman ibn Abdullah al-Kamil of the Sulaymānid dynasty of Tlemcen, Archgoul, Ténès (Western Algeria) Da'wud ibn Hasan al-Muthanna Sulayman ibn Da'wud of the Sulaymanid dynasty Ibrahim al-Ghamr ibn Hasan al-Muthanna Isma'il ibn Ibrahim al-Ghamr Ibrahim Tabataba ibn Isma'il Al-Qasim al-Rassi ibn Ibrahim