Ottoman conquest By the beginning of the 16th century the Libyan coast had minimal central authority and its harbours were havens for unchecked bands of pirates. The
Spaniards occupied Tripoli in 1510, but the Spaniards were more concerned with controlling the port than with the inconveniences of administering a colony. In 1530 the city, along with
Malta and
Gozo, was ceded by
Charles I of Spain to the
Knights of St John as compensation for their recent expulsion from the island of
Rhodes at the hands of the Ottoman Turks. Christian rule lasted then until 1551, when Tripoli was
besieged and conquered by famed Ottoman admirals
Sinan Pasha and
Turgut Reis. Declared as
Bey and later
Pasha of Tripoli, Turgut Reis received submission from the tribes of the interior and several cities like
Misrata,
Zuwara,
Gharyan, and
Gafsa in the next decade. These efforts contributed to cement the foundations of a statal structure in what is today Libya, but control from
Constantinople remained loose at best, much like in the rest of the
Barbary Coast of
North Africa. Under the Ottomans, the
Maghreb was divided into three provinces,
Algiers,
Tunis, and
Tripoli. After 1565, administrative authority in Tripoli was vested in a Pasha directly appointed by the Sultan in Constantinople. The sultan supported the pasha with a corps of
janissaries who he was dependent upon, which was in turn divided into a number of companies under the command of a junior officer or
bey. The janissaries quickly became the dominant force in Ottoman Libya and were also in charge of collecting taxes; however,
Barbary corsairs were the ones who steadily provided income to Tripoli from privateering activities. As a self-governing military guild answerable only to their own laws and protected by a
divan (a council of senior officers who advised the pasha), the janissaries soon reduced the pasha to a largely ceremonial role. In 1611, the local chiefs of the area conducted a
coup d'état and successfully appointed Suleiman Safar, their own leader, as
dey (local chief). As a result, his successors continually held the title and even occasionally identified as pasha.
Thomas Baker, an English consul stationed in Tripoli from 1679 to 1686, described a turbulent government, a dwindling treasury and an economy heavily reliant on piracy. Tripoli's fleet was the smallest among the
Barbary States, with only 13 vessels compared to 20 in
Tunis and 40 in
Algiers. In 1711,
Ahmed Karamanli, an Ottoman cavalry officer and son of a Turkish officer and Libyan woman, seized power and founded the
Karamanli dynasty, which would last 124 years. The
1790–95 Tripolitanian civil war occurred in those years. In May 1801, Pasha
Yusuf Karamanli demanded from the
United States an increase in the tribute ($83,000) which it had paid since 1796 for the protection of their commerce and
enslavement of crews by
barbary pirates when the
Treaty of Tripoli was signed. The demand was refused by third American President
Thomas Jefferson, an American naval force was sent and blockaded Tripoli, and the desultory
First Barbary War dragged on from 1801 until 3 June 1805. The Regency of Tripoli was defeated by the newly revived
United States Navy. The
Second Barbary War (1815, also known as the Algerian War) was the second of the two wars fought between the United States and the Ottoman Turks' North African regencies of Algiers, Tripoli, and Tunis, known collectively as the
Barbary States. On 5 September 1817, Yusuf Karamanli invited the leaders of the Libyan tribe of Al-Jawazi to his castle in
Benghazi, following a dispute regarding tribute and an uprising against his rule. Consequently, the Pasha ordered the execution of all attendees, and chased down the other tribe members, which resulted in the massacre of at least 10,000 people, who eventually sought refuge in neighboring countries, especially
Egypt. This was known as the
Al-Jawazi massacre.
Reassertion of Ottoman authority In 1835 the government of Sultan
Mahmud II took advantage of local disturbances to reassert their direct authority. As decentralized Ottoman power had resulted in the virtual independence of Egypt as well as Tripoli, the coast and desert lying between them relapsed to anarchy, even after direct Ottoman control was resumed in Tripoli. The indigenous
Senusiyya (or Sanusi) Movement, led by Islamic cleric
Muhammad ibn Ali al-Sanusi, called on the countryside to resist Ottoman rule. The Grand Senussi established his headquarters in the oasis town of
Jaghbub while his
ikhwan (brothers) set up
zawiyas (religious colleges or monasteries) across North Africa and brought some stability to regions not known for their submission to central authority. In line with the expressed instruction of the Grand Sanusi, these gains were made largely without any coercion. It was one of the first Ottoman provinces to be reclassified from an
eyalet to a
vilayet after an
administrative reform in 1865, and by 1867 it had been reformed into the Tripolitania Vilayet. The Ottoman sultan
Abdulhamid II twice sent his aide-de-camp Azmzade Sadik El Mueyyed to meet Sheikh Sanusi to cultivate positive relations and counter the West European scramble for Africa. The highpoint of the Sanusi influence came in the 1880s under the Grand Senussi's son,
Muhammad al-Mahdi al-Sanusi. With 146 lodges spanning the entire Sahara, he moved the Senussi capital to
Kufra. Over a 75‑year period, the Ottoman Turks provided 33 governors and Libya remained part of the empire until
Italy invaded for the second time in 1911.
Italo-Turkish War The
Italo-Turkish War was fought between the
Ottoman Empire and the
Kingdom of Italy from September 29, 1911, to October 18, 1912. As a result of this conflict, the Ottoman Turks ceded the provinces of
Tripolitania,
Fezzan, and
Cyrenaica to Italy. These provinces together formed what became known as
Libya. ==Administrative divisions==