For most of the 19th century both Tunisia and the coastal regions of modern Libya (organised as the Vilayet of Tripolitania were part of the Ottoman Empire, though with a large degree of de facto autonomy.