Berber Revolt
Another group of the Miknasa took part in the successful massive Berber Revolt led by Maysara al-Matghari in 739-742 against the Umayyad Arabs, and managed to wipe out the Umayyad Arab presence in Morocco and Algeria. The Berber principality Banu Midrar is named after Abul-Qasim Samku ibn Wasul, nicknamed Midrar, a Miknasa Berber who was said to take part in the Berber Revolt. The Miknasa adopted Kharijism-Islam and established the Emirate of Sijilmasa, under the Midrarid dynasty, on the northern edge of the Sahara in 757. This became very wealthy as the western end-point of the Trans-Saharan trade route with the Sudan. In alliance with the Caliphate of Córdoba, it was able to fight off the attacks of the Fatimids. However, when the Miknasa chief Al-Mutazz allied himself with the Fatimids, the Miknasa were driven out of Sijilmasa by the Maghrawa, who were allies of the Umayyads.