The Great Berber Revolt of 739/740-743 is…
736 CE to 747 CE
The Great Berber Revolt of 739/740-743 is probably the largest military setback in the reign of Caliph Hisham and marks the first successful secession from the Arab caliphate (ruled from Damascus).
The Berbers in Tangiers, fired up by Kharijite puritan preachers in 740, revolt against their Arab rulers.
The revolt soon spreads through the rest of the Maghreb (North Africa) and across the straits to al-Andalus (Spain).
The Umayyads scramble and manage to prevent the core of Ifriqiya (Tunisia) and al-Andalus from falling into rebel hands, but the rest of the Maghreb is never recovered.
The Berber rebel armies dissolve after failing to capture the Umayyad provincial capital of Kairouan, and the western Maghreb fragments into a series of small Berber statelets, ruled by tribal chieftains and Kharijite imams, and representing some of the first Muslim states outside the Caliphate.
The Great Berber Revolt is sometimes also regarded as the beginning of Moroccan independence, as Morocco will never again come under the rule of an eastern Caliph, or any other foreign power, until the twentieth century.