[3] In 1842 the Tunisian ruler Ahmed Bey, himself a reformer, sent his private secretary (probably Bin Diyaf) to Istanbul in order to offer Mahmud Qabadu a post at the new Bardo Military Academy (al-Maktab al-Harbi) in Tunis.
Khair al-Din, who was a student of Shaykh Qabadu, was aware of the sharp relevance to Tunisia of Ottoman state reforms then being contested in Istanbul.
Yet significant members of the ulama and other scribal traditions were known to favor a transformation of Tunisian society, and to make contributions to the changes, witness Mahmud Qabadu and also Bin Diyaf (1802–1874) and Muhammad Bayram (1840–1889).
[24][25][clarification needed] "Qabadu and Khayr al-Din collaborated closely in the critical matter of reform; that a mamluk became an intellectual intimate of a prestigious member of the religious establishment constitutes an index of profound shifts.
"[27] Khair al-Din led "the 'constitutional movement' that included luminaries such as Qabadu, Bayram V, bu Hajib, and Abi Diyaf, amongst a small group of reform-minded and Western-inspired figures.
The 1861 constitution, the Muslim world's first such document, the legislative council and the civic bodies created on its basis all had the support of Khayr al-Din and his co-reformers.
"[28]Shaykh Qabadu with other reformist ulama, here especially Salim Bu Hajib and Muhammad Bayram (V), provided assistance to Khair al-Din when he wrote his treatise discussing the Islamic orthodoxy of reform and advocating its pursuit, Aqwam al masalik (Tunis 1867).
[30]Accordingly, Mahmud Qabadu played a key role in the modernizing reforms and "institution-building" that proceeded through the contributions of a small band of officials, as generally led by Khair al-Din.
[31] These 19th-century reforms under the Beys, in which strategic alliances were formed linking the ulama of Zaytuna with politicians serving the state, would later provide a basis in social history for mid-20th-century developments in Tunisia.