Ziri ibn Atiyya

Under the protection of the Umayyad Caliph in al-Andalus, Hisham II, and his powerful regent al-Mansur, Ziri became king of the Zenata tribes in 978-979 and immediately set about conquering as much as he could of what is now northern Morocco.

In 987-988 he was secure enough to be able to establish his court at Fes after capturing it from the Idrisids[1][2] In 989, he was asked by al-Mansur to attack Abu al-Bahar, who controlled most of what is now Algeria and Tunisia.

He went accompanied by 300 slaves on horseback and 300 more on foot, as well as taking more presents including lions in cages, cattle that resembled horses, a bird that spoke both Arabic and Berber, dates the size of melons, and other prodigies.

[5][6][7] the Maghrawa state extended its influence from Fez to Constantine after this[8] Then followed by a period of peace during which time Ziri built (or rebuilt) the city of Oujda beginning in August or September 994.

Abd al-Malik pressed home the advantage, and the wounded Ziri fled the field hotly pursued by the Caliph's army.