List of rulers of Morocco

This is the list of rulers of Morocco, since the establishment of the first Moroccan state in 789. The common and formal titles of these rulers has varied, depending on the time period. Since 1957, the title King has been used.
Idrisid dynasty.
The first period of Fatimid overlordship lasted from 922 to 925.
The second period of Fatimid overlordship lasted from 927 to 937.
In 974, the Sultan Al-Hasan ben Kannun was defeated by Cordobese Umayyads. A period of Umayyad overlordship followed then.
Almoravid dynasty.
Almohad uprising started in 1145
Almohad dynasty.
Marinid overlordship, from 1248 until the fall of the Almohads in 1269
Saadi dynasty.
1603–1627: Succession war
Main Saadian rulers, based in Marrakesh:
Splinter faction based in Fes, with only local power:
1627–1659: Reunified rule
Alaouite dynasty.
1666–1957: Alaouite sultans of Morocco
1957–Present: Alaouite kings of Morocco