لما رحل المعز استخلف على المغرب بلكين يقال له يوسف بن زيري بن مناد الصنهاجي ويوسف هذا أسس مدائن بالمغرب الأوسط منها مليانة والجزائر وقام بأمر النيابة أحسن قيام ورتب العمال وكان حسن السيرة جميل الخصال مع صيت طائر وكفاءة معروفة، وقصد المغرب بجيوش جرارة واستولى على فاس وسجلماسة وغيرها وشتت جموع زناتة واتسع نطاق ملكه ولم يزل على طاعة مستخلفه إلى أن توفي سنة 372 ه وبويع لابنه أبي الفتوح منصور بن يوسف وكان جوادا كريما شجاعا صارما وكانت أيامه حسنة والظفر حليفه وكانت بينه وبين أعمامه حروب وتوفي سنة 386 ه وبويع لابنه أبي مناد باديس بن منصور وكانت ل حروب مع عمه حماد وغيره كان النصر فيها لباديس وعقب انتصاره مات باديس فجأة في ذي القعدة سنة 406 ه وأسس حماد المذكور دولة في المغرب الأوسط قاعدتها قلعة حماد وصارت لبنيه ومن يومئذ انقسمت الدولة وطرقها الخلل وهؤلاء الأمراء الذين هم في الحقيقة عمال لبني عبيد بلغوا درجة الملوك في الضخامة وبعد الصيت والسلطان. ولأبي إسحاق إبراهيم بن قاسم المعروف الرقيق القيرواني تأليف في أخبار باديس وأبيه وجده كان بين باديس وأبي محفوظ محرز بن خلف تراسل وكذلك بينه وبين ابنه المعز الآتي ذكر بعضها في خاتمة الخاتمة الآتي ذكرها.
When al-Muʿizz departed, he appointed as his deputy over the Maghrib Buluggin, who was called Yusuf ibn Ziri ibn Manad al-Sanhaji. This Yusuf founded cities in the Central Maghrib, among them Milyana and al-Jazaʾir. He discharged the office of deputy in the best way and set the governors in order. He was of good conduct and fine qualities, with a far-flying reputation and well-known competence. He made for the Maghrib with vast armies, took Fas, Sijilmasa and other places, scattered the hosts of Zanata, and the extent of his rule widened. He remained in obedience to the one who had appointed him until he died in the year 372 AH, and allegiance was given to his son Abu l-Futuh Mansur ibn Yusuf. He was generous, noble, brave and resolute; his days were good and victory was his ally. There were wars between him and his paternal uncles. He died in the year 386 AH, and allegiance was given to his son Abu Manad Badis ibn Mansur. He had wars with his uncle Hammad and others, in which victory was Badis's, and after his victory Badis died suddenly in Dhu l-Qaʿda of the year 406 AH. The said Hammad founded a dynasty in the Central Maghrib whose seat was Qalʿat Hammad, and it passed to his sons. From that day the state was divided and disorder came upon it. These emirs, who were in reality governors for the Banu ʿUbayd, reached the rank of kings in magnificence, far-reaching fame and authority. Abu Ishaq Ibrahim ibn Qasim, known as al-Raqiq al-Qayrawani, has a work on the history of Badis, his father and his grandfather. Between Badis and Abu Mahfuz Muhriz ibn Khalaf there was correspondence, and likewise between him and his son al-Muʿizz; some of it will be mentioned in the conclusion of the Conclusion that is mentioned below.