Maghrawa

[7] Historical sources indicate that their homeland was centered on the Chélif, in a region probably between the Ouarsenis to the south, the Mediterranean Sea to the north and Tlemcen to the west.

[2] In antiquity, Pliny the Elder and Ptolemy each mention a tribe named Macurebi or Makkhourebi, which some scholars have equated to the Maghrawa.

[4] The Maghrawa were initially led by the Banu Khazar family who lived in the first half of the 8th century and took control of a large part of the central Maghreb after the Kharijite revolts (circa 740).

[2] His son, Muhammad ibn Khazar, defeated the Banu Ifran and captured Tlemcen circa 788, before submitting to the Idrisids sometime between 789 and 791 and becoming their ally.

Muhammad ibn Khazar himself switched allegiances several times when the circumstances required, although his son al-Khayr, who also held territories in the central Maghreb, remained largely loyal to the Umayyads.

[9][2] After his death, the Maghrawa continued to resist the Fatimids under the leadership of his grandson, Muhammad ibn al-Khay, son of al-Khayr.

The latter had previously cultivated good relations with Abd ar-Rahman III (d. 961), the Umayyad caliph in Córdoba, who had appointed him governor of Fez in 955–6.

[2] In 971, a major confrontation took place between the Maghrawa and the Zirids, a Sanhaja clan led by Ziri ibn Manad, vassal of the Fatimids.

[2] Between 979 and 983, the Zenata were briefly driven out of Fez, Sijilmasa, and much of the surrounding regions during a major expedition by Buluggin ibn Ziri, the new Zirid ruler.

[2] In 989, Ziri defeated his enemy Abu al-Bahār, which made him ruler from the Zab to the Sous, achieving supremacy in the western Maghreb by 991.

[17][18] Meanwhile, his rival from the Banu Ifran, Yaddū ibn Ya'lā, had taken advantage of his absence and managed to capture Fez, which Ziri reconquered after a bloody struggle.

[2] However, Ziri was loyal to the Umayyad caliphs in Cordoba and increasingly resented the way that Ibn Abi 'Amir was holding Hisham II captive while progressively usurping his power.

The armies clashed near Tangiers, and in this battle, Ziri was stabbed by an African soldier who reported to Abd al-Malik that he had seriously wounded the Zenata leader.

[citation needed] After Ziri's death, his son al-Mu'izz was proclaimed his successor as leader of the Maghrawa in northern Morocco.

[2] Al-Mansur's son and successor, Abd al-Malik al-Muzaffar, confirmed him as governor of Fez and the Maghreb al-Aqsa in 1002–3 and again in 1006, with the exception of Sijilmasa, which was left under the rule of the Banu Khazrun.

[2] Hamama strengthened his relations with Córdoba but in 1032–3 he became embroiled in war with the rival Banu Ifran leader, Abu al-Kamal Tamim ibn Ziri, based in Chellah.

[2] By the mid 11th century, the Maghrawa still controlled most of Morocco, notably most of the Sous and Draa River area as well as Aghmat, Fez and Sijilmasa.

[10] As Zenata power declined, the leaders of the Magharawa and Banu Ifran became more oppressive and violent, with some historical chronicles claiming that the local population welcomed the arrival of the Almoravids.

[2] This allowed them to rule an effectively independent kingdom until the 1050s, when they came into conflict with some of the Banu Hilal tribes arriving from the east, who took over much of the countryside.

[2] Despite the Almoravid conquest, various groups of Maghrawa continued to live in various parts of Morocco until at least the 14th century, when they are mentioned by sources such as Ibn Khaldun.

They unsuccessfully attempted to throw off the authority of the Zayyanid sultans in Tlemcen on several occasions around the mid-century until their final defeat in 1372, after which many of them left the region.

Overall, the mass migration of the Banu Ifran and Maghrawa because of the Sanhaja expansion caused political and ethnic revolution in Morocco.

[9][2] Starting with Ziri Ibn Atiyya, the Maghrawa dynasty that ruled Fez and the surrounding region consisted of two family branches descended from the sons of Atiya.