ولم يعقب حسن بن يحيى فاستخلف "نجا" على سبتة وطنجة من وثق به من الصقالبة عند وصول الخبر إليه، وركب البحر إلى مالقة فلما وصل إليها زاد في الاحتياط علي إدريس بن يحيى وأكد اعتقاله، وعزم على محو أمر الحسينين جملة، وأن يضبط تلك البلاد لنفسه، فدعا البربر الذين كانوا جند البلد وكشف الأمر إليهم علانية، ووعدهم بالإحسان، فلم يجدوا من مساعدته بدا في الظاهر، وعظم ذلك في أنفسهم باطنا، ثم جمع عسكره ونهض إلى الجزيرة، ليستأصل محمدا بن القاسم فحاربها أياما ثم أحس بفتور نية من كان معه، فرأى أن يرجع إلى مالقة فإذا حصل فيها نفى من يخاف غائلته منهم واستصلح سائرهم، واستدعى الصقالبة من حيث ما أمكنه، ليقوى بهم على غيرهم، وأحس البربر بهذا منه فاغتالوه في الطريق من قبل أن يصل إلى مالقة، فقتل وهو على دابته في مضيق صار فيه، وقد تقدم إليه الذي أراد الفتك به، وفر من كان معه من الصقالبة بأنفسهم، ثم تقدم فارسان من الذين كانوا غدروا به يركضان حتى وردا مالقة ودخلا وهما يقولان: البشرى البشرى، فلما وصلا إلى السطيفي وضعا سيفهما عليه فقتلاه، ثم وافى العسكر فاستخرجوا إدريس بن يحيى من محبسه فقدموه وبايعوه بالخلافة وتسمى بالعالي، فظهرت منه أمور متناقضة منها: أنه كان راحم الناس قلبا كثير الصدقات، يتصدق كل يوم جمعة بخمسمائة
Hasan ibn Yahya left no descendants. When the news reached him, "Naja" appointed as deputy over Sabta and Tanja one of the Saqaliba whom he trusted, and took ship to Malaqa. When he got there he increased the precautions over Idris ibn Yahya and tightened his imprisonment, and resolved to wipe out the cause of the Husaynids altogether and to secure those lands for himself. He called the Berbers who were the soldiery of the town and revealed the matter to them openly, promising them good treatment; outwardly they found they had no choice but to help him, but inwardly it weighed heavily on them. Then he gathered his army and set out for al-Jazira, to root out Muhammad ibn al-Qasim. He fought it for some days, then sensed a slackening of resolve in those who were with him, and decided to return to Malaqa, so that once there he would banish those of them whose treachery he feared and win over the rest, and summon the Saqaliba from wherever he could, to be strengthened by them against the others. The Berbers sensed this in him and assassinated him on the road before he reached Malaqa: he was killed on his mount in a narrow pass he had come into, the one who meant to strike him having gone up to him, and the Saqaliba who were with him fled for their lives. Then two horsemen of those who had betrayed him galloped ahead until they reached Malaqa, and entered it saying: Good news! Good news! When they got to al-Satifi they put their swords to him and killed him. Then the army arrived; they brought Idris ibn Yahya out of his prison, put him forward and pledged allegiance to him as caliph, and he took the title al-ʿAli. Contradictory things appeared in him. Among them: he was merciful of heart toward the people and gave much charity, giving five hundred