the Arab dynasty that ruled in the territory of present-day Morocco from the end of the eighth to the tenth century. The founder of the dynasty and the Idrisid state, Idris ibn Abdallah (ruled 788–792), fled from Arabia after unsuccessful opposition against the Abbasids. In 789, he founded the city of Fez, which became the capital of the Idrisid state under Idris II (ruled 792–828). After the death of Idris II, the state broke up into independent principalities, which were liquidated by the troops of the Cordoba caliph in 974.