The Magrawa, a tribe of Zanata Berbers, were one of the first Berber tribes to submit to Islam in the 7th century. They supported Uqba ibn Nafi in his campaign to the Atlantic in 683. They were Kharijites from the 8th century, and allied first with the Idrisids, and, from the 10th century, with the Umayyads of Córdoba. As a result they were caught up in the Umayyad-Fatimid conflict in Morocco. Although they won a victory over the allies of the Fatimids in 924, they soon became allied with them themselves. When they switched back to the side of Córdoba, they were driven out of central Morocco by the Zirids, who ruled on behalf of the Fatimids. In 980, however, they were able to drive the Miknasa out of Sijilmasa.
Under Ziri ibn Atiyya (to 1001) the Magrawa achieved supremacy in Fez under Umayyad suzerainty and expanded their territory at the expense of the Banu Ifran. A revolt against the Andalusian Umayyads was put down by Al-Mansur (Abi Amir), although the Magrawa were able to regain power in Fez. Under the succeeding rulers al-Muizz (1001-1026), Hamman (1026-1039) and Dunas (1039) they consolidated their rule in northern and central Morocco. However, internal power struggles after 1060 enabled the Almoravids to conquer them in 1070 and put an end to their rule.
Dynasty of Maghrawa tribe