تقدم في ترجمة المعيطي وابن المكوي أن الحكم هذا كلفهما بتأليف الاستيعاب فألفاه وأجازهما على ذلك جائزة سنية وكانت مدة ولايته ستة عشر سنة وبويع لابنه هشام المؤيد وعمره تسع سنين واستوزر محمد بن أبي عامر الملقب بالمنصور المعافري ومعافر بطن من حمير وباشر هذا الوزير تدبير الملك بنفسه وكان ذا عقل ورأي وشجاعة وكرم وبصيرة بالحروب ودين متين وكان عالما متفننا وله غير ذلك من الصفات الحميدة وسيرته مشهورة في التواريخ ومفردة بالتأليف واستمر على سيرته سبعا وعشرين سنة وذكر في نفح الطيب كثيرا من غزواته وأخباره في الكرم والعفو والحلم وحسن الخلق ثم قال: وأخبار المنصور تشمل مجلدات، وتوفي في صفر سنة 392 ه فقام بأمر الوزارة بعده ابناه فأولا عبد الملك فجرى على سنن أبيه في السياسة والغزو وكانت أيامه أعيادا دامت سبع سنين ثم قام بالأمر بعده الابن الآخر عبد الرحمن وجرى على سنن أبيه وأخيه في الحجر على الخليفة هشام والاستبداد عليه ثم طلب من هشام أن يجعله ولي عهده فأجابه لذلك لتغلبه عليه وأحضر لذلك أرباب الشورى وأهل الحل والعقد وكتب عهده بذلك ثم سعى كثير من الأمويين وغيرهم في نقضه وأثاروا لذلك فتنة إلى أن قتلوا عبد الرحمن المذكور سنة 399 ه ثم خلعوا الخليفة هشاما وبايعوا غيره ثم أعيد هشام ثم فقد سنة 403 ه وثارت بسبب ذلك فتن كثيرة يطول ذكرها آل الأمر فيها إلى زوال ملكهم وافتراق كلمتهم وكل يوم يخلعون خليفة ويبايعون آخر إلى أن انقضت الدولة الأموية من الأرض سنة 428 ه وانتثر سلك الخلافة بالمغرب وقام الطوائف بعد انقراض الخلائف متغلبين في كل ناحية ملك مستقل وتغلب بعضهم على بعض ولا حاجة بنا إلى ذكر أسمائهم ومن أشهرهم بنو عباد ملوك إشبيلية الذين منهم المعتمد بن عباد وعند ذلك استفحل أمر النصارى بالأندلس وجرت بعد ذلك أمور ستقف على بعضها إن شاء الله وهي مبسوطة في نفح الطيب وغيره. قال ولي الدين بن خلدون: إن دولة بني أمية بالأندلس لما فسدت عصبيتها من العرب استولى ملوك الطوائف على أمورها واقتسموا خطتها وتنافسوا وتوزعوا ممالك الدولة كل واحد منهم على مكان في ولايته وشمخ بأنفه وبلغهم شأن ملك العجم من الدولة العباسية فتلقبوا بألقاب الملك ولبسوا شارته لاستيلاء الترف عليهم ولذلك يشير ابن رشيق في قوله:
been mentioned in the biography of al-Muʿayti and Ibn al-Mukawwi that this al-Hakam charged them with composing al-Istiʿab; they composed it and he gave them a splendid reward for it. The duration of his rule was sixteen years. Allegiance was given to his son Hisham al-Muʾayyad, aged nine, and he took as vizier Muhammad ibn Abi ʿAmir, nicknamed al-Mansur, al-Maʿafiri — Maʿafir is a clan of Himyar. This vizier managed the kingdom himself. He was a man of intelligence, judgment, courage and generosity, with insight into wars and firm religion; he was a scholar versed in many arts, and had other praiseworthy qualities besides. His life is famous in the histories and has been the subject of separate works. He continued in his course for twenty-seven years. In Nafh al-tib are mentioned many of his campaigns and his reports of generosity, pardon, forbearance and good character; then he said: The reports of al-Mansur fill volumes. He died in Safar of the year 392 AH. After him his two sons took charge of the vizierate: first ʿAbd al-Malik, who followed his father's course in policy and campaigning, and his days were festivals that lasted seven years. Then after him the other son, ʿAbd al-Rahman, took charge of the affair and followed the course of his father and brother in restricting the caliph Hisham and holding absolute power over him. Then he asked Hisham to make him his heir, and he granted him that because he dominated him; he summoned for that the members of the council and those who loose and bind, and wrote his deed of succession accordingly. Then many of the Umayyads and others worked to annul it and stirred up a sedition over it, until they killed the said ʿAbd al-Rahman in the year 399 AH. Then they deposed the caliph Hisham and gave allegiance to another; then Hisham was restored; then he disappeared in the year 403 AH. Because of that many seditions arose, too long to mention, in which the affair ended in the disappearance of their kingdom and the division of their word; every day they deposed a caliph and gave allegiance to another, until the Umayyad dynasty vanished from the land in the year 428 AH. The string of the caliphate in the West was scattered, and the factions (al-tawaʾif) arose after the extinction of the caliphs, prevailing in every region as independent kings, some overcoming others. We have no need to mention their names; among the most famous of them were the Banu ʿAbbad, kings of Ishbiliya, among whom was al-Muʿtamid ibn ʿAbbad. At that point the power of the Christians in al-Andalus grew strong, and afterwards things happened, some of which you will come upon, God willing; they are set out at length in Nafh al-tib and elsewhere. Wali al-Din ibn Khaldun said: When the ʿasabiyya of the Arabs in the dynasty of the Banu Umayya in al-Andalus became corrupt, the Party Kings took over its affairs, divided its territory among themselves, competed and shared out the provinces of the state, each of them over a place in his governorship, and grew haughty. The state of the kingship of the non-Arabs in the ʿAbbasid dynasty reached them, so they took the titles of kingship and wore its insignia, because luxury had taken hold of them. To that Ibn Rashiq alludes in his saying: