# Al-Qasim ibn Idris

Al-Qasim ibn Idris was an Idrisid prince and ruler in parts of Morocco during the 9th century.

## Life

Al-Qasim was a younger son of the second Idrisid ruler of Morocco, Idris II (r. 808–828). Upon the death of Idris II, al-Qasim's oldest brother Muhammad succeeded to the throne, but divided much of the country among his younger brothers. Thus al-Qasim received rule over Tangier and Basra in the north.
When another brother, Isa, rose in revolt, al-Qasim refused to support Muhammad, and was attacked and deprived of his domains by another brother, Umar. Al-Qasim outlived his brother and the latter's sons, and in the reign of his great-nephew, Yahya II (r. 863–866), his family received governance of the western half of the Idrisid capital, Fes, along with the eastern frontier provinces of the Berber tribes of Luwata and Kutama.
Towards the end of the 9th century, the family of al-Qasim remained in control of northern Morocco (Tangier, Basra, Ceuta), and his son, Yahya III, ruled over Fes for a while after evicting the Kharijite rebel Abd al-Razzaq from the city. The last Idrisid rulers all descended from al-Qasim via his son Muhammad.

## Genealogy

Idrisid dynasty :
* Emirs of Morocco
* Caliphs of Córdoba
* Emirs of Algericas
* Emirs of Málaga
| | | | | | | | | | | | | | | | | | | | | Abd al-Muttalib ibn Hashim | Abd al-Muttalib ibn Hashim | Abd al-Muttalib ibn Hashim | Abd al-Muttalib ibn Hashim | Abd al-Muttalib ibn Hashim | Abd al-Muttalib ibn Hashim |
| | | | | | | | | | | | | | | | | Abu Talib ibn Abd al-Muttalib | Abu Talib ibn Abd al-Muttalib | Abu Talib ibn Abd al-Muttalib | Abu Talib ibn Abd al-Muttalib | Abu Talib ibn Abd al-Muttalib | Abu Talib ibn Abd al-Muttalib | | | Abdullah ibn Abd al-Muttalib | Abdullah ibn Abd al-Muttalib | Abdullah ibn Abd al-Muttalib | Abdullah ibn Abd al-Muttalib | Abdullah ibn Abd al-Muttalib | Abdullah ibn Abd al-Muttalib |
| | | | | | | | | | | | | | | | | | | | | | | | | Muhammad ibn Abd Allah | Muhammad ibn Abd Allah | Muhammad ibn Abd Allah | Muhammad ibn Abd Allah | Muhammad ibn Abd Allah | Muhammad ibn Abd Allah | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | Ali ibn Abi Talib | Ali ibn Abi Talib | Ali ibn Abi Talib | Ali ibn Abi Talib | Ali ibn Abi Talib | Ali ibn Abi Talib | | | Fatima bint Muhammad | Fatima bint Muhammad | Fatima bint Muhammad | Fatima bint Muhammad | Fatima bint Muhammad | Fatima bint Muhammad | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | al-Hasan ibn Ali | al-Hasan ibn Ali | al-Hasan ibn Ali | al-Hasan ibn Ali | al-Hasan ibn Ali | al-Hasan ibn Ali |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | al-Hasan ibn al-Hasan | al-Hasan ibn al-Hasan | al-Hasan ibn al-Hasan | al-Hasan ibn al-Hasan | al-Hasan ibn al-Hasan | al-Hasan ibn al-Hasan |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Abd Allah ibn al-Hasan | Abd Allah ibn al-Hasan | Abd Allah ibn al-Hasan | Abd Allah ibn al-Hasan | Abd Allah ibn al-Hasan | Abd Allah ibn al-Hasan |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Idris I al-Akbar r. 788-791 | Idris I al-Akbar r. 788-791 | Idris I al-Akbar r. 788-791 | Idris I al-Akbar r. 788-791 | Idris I al-Akbar r. 788-791 | Idris I al-Akbar r. 788-791 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Idris II r. 803-828 | Idris II r. 803-828 | Idris II r. 803-828 | Idris II r. 803-828 | Idris II r. 803-828 | Idris II r. 803-828 |
| | | | | | | Muhammad I r. 828-836 | Muhammad I r. 828-836 | Muhammad I r. 828-836 | Muhammad I r. 828-836 | Muhammad I r. 828-836 | Muhammad I r. 828-836 | | | | | | | | | Umar ibn Idris | Umar ibn Idris | Umar ibn Idris | Umar ibn Idris | Umar ibn Idris | Umar ibn Idris | | | | | | | | | al-Qasim ibn Idris | al-Qasim ibn Idris | al-Qasim ibn Idris | al-Qasim ibn Idris | al-Qasim ibn Idris | al-Qasim ibn Idris | Dawud r. c. 877 | Dawud r. c. 877 | Dawud r. c. 877 | Dawud r. c. 877 | Dawud r. c. 877 | Dawud r. c. 877 |
| Ali I r. 836-849 | Ali I r. 836-849 | Ali I r. 836-849 | Ali I r. 836-849 | Ali I r. 836-849 | Ali I r. 836-849 | Yahya I r. 849-863 | Yahya I r. 849-863 | Yahya I r. 849-863 | Yahya I r. 849-863 | Yahya I r. 849-863 | Yahya I r. 849-863 | Ali II r. 866-? | Ali II r. 866-? | Ali II r. 866-? | Ali II r. 866-? | Ali II r. 866-? | Ali II r. 866-? | | | Idris ibn Umar | Idris ibn Umar | Idris ibn Umar | Idris ibn Umar | Idris ibn Umar | Idris ibn Umar | | | Ubayd Allah ibn Umar | Ubayd Allah ibn Umar | Ubayd Allah ibn Umar | Ubayd Allah ibn Umar | Ubayd Allah ibn Umar | Ubayd Allah ibn Umar | Yahya III r. ?-905 | Yahya III r. ?-905 | Yahya III r. ?-905 | Yahya III r. ?-905 | Yahya III r. ?-905 | Yahya III r. ?-905 | Muhammad ibn al-Qasim | Muhammad ibn al-Qasim | Muhammad ibn al-Qasim | Muhammad ibn al-Qasim | Muhammad ibn al-Qasim | Muhammad ibn al-Qasim |
| | | | | | | Yahya II r. 863-866 | Yahya II r. 863-866 | Yahya II r. 863-866 | Yahya II r. 863-866 | Yahya II r. 863-866 | Yahya II r. 863-866 | | | | | | | | | Yahya IV r. 905-922 | Yahya IV r. 905-922 | Yahya IV r. 905-922 | Yahya IV r. 905-922 | Yahya IV r. 905-922 | Yahya IV r. 905-922 | | | Ali ibn Ubayd Allah | Ali ibn Ubayd Allah | Ali ibn Ubayd Allah | Ali ibn Ubayd Allah | Ali ibn Ubayd Allah | Ali ibn Ubayd Allah | al-Hasan I al-Hajjam r. 928–930 | al-Hasan I al-Hajjam r. 928–930 | al-Hasan I al-Hajjam r. 928–930 | al-Hasan I al-Hajjam r. 928–930 | al-Hasan I al-Hajjam r. 928–930 | al-Hasan I al-Hajjam r. 928–930 | al-Qasim Kanun r. 937-949 | al-Qasim Kanun r. 937-949 | al-Qasim Kanun r. 937-949 | al-Qasim Kanun r. 937-949 | al-Qasim Kanun r. 937-949 | al-Qasim Kanun r. 937-949 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hammud ibn Ali | Hammud ibn Ali | Hammud ibn Ali | Hammud ibn Ali | Hammud ibn Ali | Hammud ibn Ali | Abu al-Aysh Ahmad r. 948-954 | Abu al-Aysh Ahmad r. 948-954 | Abu al-Aysh Ahmad r. 948-954 | Abu al-Aysh Ahmad r. 948-954 | Abu al-Aysh Ahmad r. 948-954 | Abu al-Aysh Ahmad r. 948-954 | al-Hasan II r. 954-974 | al-Hasan II r. 954-974 | al-Hasan II r. 954-974 | al-Hasan II r. 954-974 | al-Hasan II r. 954-974 | al-Hasan II r. 954-974 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maymun ibn Hammud | Maymun ibn Hammud | Maymun ibn Hammud | Maymun ibn Hammud | Maymun ibn Hammud | Maymun ibn Hammud | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hammud ibn Maymun | Hammud ibn Maymun | Hammud ibn Maymun | Hammud ibn Maymun | Hammud ibn Maymun | Hammud ibn Maymun | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | al-Qasim al-Ma'mun r. 1018-1021, 1023 | al-Qasim al-Ma'mun r. 1018-1021, 1023 | al-Qasim al-Ma'mun r. 1018-1021, 1023 | al-Qasim al-Ma'mun r. 1018-1021, 1023 | al-Qasim al-Ma'mun r. 1018-1021, 1023 | al-Qasim al-Ma'mun r. 1018-1021, 1023 | | | | | | | | | | | Ali al-Nasir r. 1016-1018 | Ali al-Nasir r. 1016-1018 | Ali al-Nasir r. 1016-1018 | Ali al-Nasir r. 1016-1018 | Ali al-Nasir r. 1016-1018 | Ali al-Nasir r. 1016-1018 |
| | | | | | | | | | | | | Muhammad al-Mahdi r. 1035-1048 | Muhammad al-Mahdi r. 1035-1048 | Muhammad al-Mahdi r. 1035-1048 | Muhammad al-Mahdi r. 1035-1048 | Muhammad al-Mahdi r. 1035-1048 | Muhammad al-Mahdi r. 1035-1048 | | | | | | | | | | | Idris I al-Muta'ayyad r. 1035-1039 | Idris I al-Muta'ayyad r. 1035-1039 | Idris I al-Muta'ayyad r. 1035-1039 | Idris I al-Muta'ayyad r. 1035-1039 | Idris I al-Muta'ayyad r. 1035-1039 | Idris I al-Muta'ayyad r. 1035-1039 | Yahya I al-Mu'tali r. 1021-1023, 1025-1026 r. 1026-1035 | Yahya I al-Mu'tali r. 1021-1023, 1025-1026 r. 1026-1035 | Yahya I al-Mu'tali r. 1021-1023, 1025-1026 r. 1026-1035 | Yahya I al-Mu'tali r. 1021-1023, 1025-1026 r. 1026-1035 | Yahya I al-Mu'tali r. 1021-1023, 1025-1026 r. 1026-1035 | Yahya I al-Mu'tali r. 1021-1023, 1025-1026 r. 1026-1035 |
| | | | | | | | | | | | | al-Qasim al-Wathiq r. 1048-1054 | al-Qasim al-Wathiq r. 1048-1054 | al-Qasim al-Wathiq r. 1048-1054 | al-Qasim al-Wathiq r. 1048-1054 | al-Qasim al-Wathiq r. 1048-1054 | al-Qasim al-Wathiq r. 1048-1054 | | | Muhammad I al-Mahdi r. 1047-1053 | Muhammad I al-Mahdi r. 1047-1053 | Muhammad I al-Mahdi r. 1047-1053 | Muhammad I al-Mahdi r. 1047-1053 | Muhammad I al-Mahdi r. 1047-1053 | Muhammad I al-Mahdi r. 1047-1053 | | | Yahya II al-Qa'im r. 1039-1040 | Yahya II al-Qa'im r. 1039-1040 | Yahya II al-Qa'im r. 1039-1040 | Yahya II al-Qa'im r. 1039-1040 | Yahya II al-Qa'im r. 1039-1040 | Yahya II al-Qa'im r. 1039-1040 | Idris II al-Ali r. 1042-1047, 1053-1054/5 | Idris II al-Ali r. 1042-1047, 1053-1054/5 | Idris II al-Ali r. 1042-1047, 1053-1054/5 | Idris II al-Ali r. 1042-1047, 1053-1054/5 | Idris II al-Ali r. 1042-1047, 1053-1054/5 | Idris II al-Ali r. 1042-1047, 1053-1054/5 | Hasan al-Mustansir r. 1040-1042 | Hasan al-Mustansir r. 1040-1042 | Hasan al-Mustansir r. 1040-1042 | Hasan al-Mustansir r. 1040-1042 | Hasan al-Mustansir r. 1040-1042 | Hasan al-Mustansir r. 1040-1042 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Idris III al-Sami r. 1053 | Idris III al-Sami r. 1053 | Idris III al-Sami r. 1053 | Idris III al-Sami r. 1053 | Idris III al-Sami r. 1053 | Idris III al-Sami r. 1053 | Muhammad II al-Musta'li r. 1054/5 | Muhammad II al-Musta'li r. 1054/5 | Muhammad II al-Musta'li r. 1054/5 | Muhammad II al-Musta'li r. 1054/5 | Muhammad II al-Musta'li r. 1054/5 | Muhammad II al-Musta'li r. 1054/5 | Abd Allah ibn Idris | Abd Allah ibn Idris | Abd Allah ibn Idris | Abd Allah ibn Idris | Abd Allah ibn Idris | Abd Allah ibn Idris |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Muhammad ibn Abd Allah | Muhammad ibn Abd Allah | Muhammad ibn Abd Allah | Muhammad ibn Abd Allah | Muhammad ibn Abd Allah | Muhammad ibn Abd Allah | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Muhammad ibn Muhammad al-Idrisi | Muhammad ibn Muhammad al-Idrisi | Muhammad ibn Muhammad al-Idrisi | Muhammad ibn Muhammad al-Idrisi | Muhammad ibn Muhammad al-Idrisi | Muhammad ibn Muhammad al-Idrisi | | | | | | |