وبأثر ذلك دخل الحاضرة الأمير الباشا محمد بن حسين باي وأخوه علي في يوم مشهود خفقت فيه الرايات والبنود في ذي الحجة سنة 1169ه فهرعت الخاصة والعامة إلى بيعتهما واطمأنت الأنفس وقرت العيون بعود الدر إلى معدنه وجلس محمد على كرسي المملكة فزانه بعدله وإحسانه وكان من سمحاء الملوك وصدور الأدباء وفحول الشعراء له ديوان شعر بديع وقصائد نبوية وتوسلية تدل على حسن وثوقه بالله وأوليائه أما قصيدتاه الميمية والقافية فهما غاية في الإبداع وقد سمى أولاهما محركات السواكن إلى أشرف الأماكن ومطلعها:
Following that, the amir Basha Muhammad ibn Husayn Bay and his brother ʿAli entered the capital on a memorable day on which banners and standards fluttered, in Dhu l-Hijja of the year 1169 AH. The elite and the commoners hastened to pledge allegiance to them, souls became tranquil and eyes were gladdened by the return of the pearl to its source. Muhammad sat on the throne of the kingdom and adorned it with his justice and beneficence. He was among the most generous of kings, the foremost of men of letters and the great poets; he has a fine diwan of poetry and poems on the Prophet and of supplication, which show his good trust in God and His friends. As for his two qasidas rhyming in mim and qaf, they are the utmost in creativity; he named the first of them Muharrikat al-sawakin ila ashraf al-amakin, and it begins:
هل زورة تشفي فؤاد متيم ... يا أهل مكة والحطيم وزمزم
Is there a visit that would heal the heart of one enslaved by love ... O people of Mecca, the Hatim and Zamzam?
وشرحها قاضي محلته وأستاذه الشيخ محمد بن محمد الشافعي الشريف بجزأين ضخمين التزم في شرح كل بيت منها خمس فنون اللغة والنحو والمعاني والبيان والبديع فهو شرح مشحون علما وأدبا وأما القصيدة القافية فشرحها الشيخ صالح الكواش وقيل ابنه محمد الكواش وكانت أيامه على قصرها مواسم بواسم وتوفي في جمادى الثانية سنة 1172ه ورثاه الشيخ محمد الورغي المذكور بقصيدة مطلعها:
It was commented on by the qadi of his camp and his teacher, Shaykh Muhammad ibn Muhammad al-Shafiʿi al-Sharif, in two huge parts, in which he bound himself, in the commentary on every verse of it, to five disciplines: lexicography, grammar, maʿani, bayan and badiʿ; so it is a commentary filled with learning and literature. As for the qaf qasida, it was commented on by Shaykh Salih al-Kawwash — and it is said, by his son Muhammad al-Kawwash. His days, despite their shortness, were smiling festivals. He died in Jumada l-Thaniya of the year 1172 AH, and Shaykh Muhammad al-Wirghi mentioned lamented him with a qasida that begins:
هذا ضريح للإمام الأمجد ... فخر الملوك السيد ابن السيد
This is a tomb of the most glorious imam ... pride of kings, the lord son of the lord.
وآخرها:
And its end:
بشرى له إذ جاء في تاريخه ... يا حسن حور زينت لمحمد
Good tidings to him, since there came in its date ... “O the beauty of houris adorned for Muhammad!”