The Husainid Dynasty is the former ruling dynasty of Tunisia originally of Muslim Cretan origin. They came to power under al-Husayn I ibn Ali at-Turki in 1705 replacing the Muradid Dynasty. After taking power the Husainids ruled as Beys with succession to the throne determined by age with the oldest member of the dynasty becoming Bey. The heir apparent to the Bey held the title Bey al-Mahalla. The Husainids originally ruled under the suzerainty of the Ottoman Empire. In 1881 Tunisia came under the control of France as a protectorate. Following independence from France on March 20, 1956, the Bey Muhammad VIII al-Amin assumed the title of King and reigned as such until the prime minister Habib Bourguiba deposed the dynasty and declared Tunisia a republic on July 25, 1957.