text: The Beylik of Tunis () was a de facto independent state located in present-day Tunisia, formally part of the Ottoman Empire. It was ruled by the Husainid dynasty from 1705 until the establishment of the French protectorate of Tunisia in 1881. The term beylik refers to the monarch, who was called the Bey of Tunis. Under the protectorate, the institution of the Beylik was retained nominally, with the Husainids remaining as largely symbolic sovereigns.
  The Beys remained faithful to the Sublime Porte, but reigned as monarchs after gradually gaining independence from the Ottoman Empire. Between 1861 and 1864, the Beylik of Tunis became a constitutional monarchy after adopting the first constitution in Africa and the Arab world. The country had its own currency and an independent army, and in 1831 it adopted its flag, which is still in use today.
  The institution of the Beylik was finally abolished one year after independence on 25 July 1957 when the republic was declared.
  History
  Establishment of the beylik (1705–1735)