Umayyad Caliphate

Berber Revolt
Tangiers, MoroccoThe Berber Revolt of 740–743 AD (122–125 AH in the Islamic calendar) took place during the reign of the Umayyad Caliph Hisham ibn Abd al-Malik and marked the first successful secession from the Arab caliphate (ruled from Damascus). Fired up by Kharijite puritan preachers, the Berber revolt against their Umayyad Arab rulers began in Tangiers in 740, and was led initially by Maysara al-Matghari. The revolt soon spread through the rest of the Maghreb (North Africa) and across the straits to al-Andalus.
The Umayyads scrambled and managed to prevent the core of Ifriqiya (Tunisia, East-Algeria and West-Libya) and al-Andalus (Spain and Portugal) from falling into rebel hands. But the rest of the Maghreb was never recovered. After failing to capture the Umayyad provincial capital of Kairouan, the Berber rebel armies dissolved, and the western Maghreb fragmented into a series of small Berber statelets, ruled by tribal chieftains and Kharijite imams.
The Berber revolt was probably the largest military setback in the reign of Caliph Hisham. From it, emerged some of the first Muslim states outside the Caliphate.