Idrisid Idrisid Ekam Category="History of Morocco"The Idrisids were the first Arab dynasty in the western Maghreb, ruling from 788 to 985, and can be thought of as the originators of an independent Morocco.

Rulers:

The founder of the dynasty was Idris ibn Abdallah (788-791), who traced his ancestry back to Ali ibn Abi Talib and Fatima. As a Shiite he was persecuted by the Abbasids and fled to the Maghreb in 786, where he was taken in by the Berbers. Since the Maysara uprising the authority of the Caliphate in North Africa was already badly shaken, and the new kingdom of Idris I represented the first autonomous Islamic state in Morocco.

His son Idris II (791-828) developed the area of Fez, already colonised by his father, as a royal residence and capital. Through the settlement of refugees from Kairouan and Andalusia the city quickly became the focus for the Islamification and Arabisation of North Africa. The realm was also extended through campaigns into the High Atlas Mountains and against Tlemcen, so that the Idrisid state became the most significant power in Morocco, ahead of the principalites of the Bargawata. the Salihids, the Miknasa and the Magrawa of Sijilmasa.

Under Muhammad (828-836) the kingdom was divided amongst eight brothers, whereby several Idrisid statelets formed in northern Morocco. This led to intensified power struggles and the weakening of the Idrisids. Even when the realm was reunified under Yahya IV (904-921), it still lost significance through internal strife and attack from the Miknasa, Fatimid allies. After a defeat by the Miknasa in 905 the Idrisids were driven from Fez. Only with the support of the Caliphate of Cordoba could the dynasty subsequently hold out against the Fatimids and their allies. After 926 the Idrisids abandoned Fez for good and withdrew to the valleys of the Rif mountains. The last Idrisid was deposed in 985, and they were succeeded in Morocco by the principality of the Magrawa.