Port · Barbary Coast

Tripoli

Tripoli, today the capital of Libya, was the smallest of the three Barbary regencies, self-governing provinces of the Ottoman Empire. In 1711 a cavalry officer, Ahmed Karamanli, seized power there and founded a family of pashas that ruled until 1835. Its licensed corsairs, treaties with European states and caravans from across the Sahara paid for a state in a dry and poor land.

Which Tripoli was this, and who held it before 1711?

This is Tripoli on the coast of today’s Libya, once called Tripoli of the West to tell it apart from Tripoli in Lebanon. It stood on the shore of a dry country, with farmland close to the sea and desert beyond.

Spanish forces captured the city in 1510. In 1530 the emperor Charles V, who was also king of Spain, handed it to the Knights of St John, a Christian military order that also held Malta. In 1551 an Ottoman fleet, with the corsair admiral Turgut Reis, known in Europe as Dragut, drove the Knights out. Tripoli then became an Ottoman province. Its castle by the harbour, later called the Red Castle, became the governors’ home and is a museum today.

Who ruled Tripoli in 1715?

Like Algiers and Tunis, Tripoli was a regency, a province of the Ottoman Empire that governed itself. The sultan sent a governor, a pasha, but by the 1600s real power often lay with a dey, the commander of the soldiers, and rival factions fought over the council. In the years before 1711 few rulers lasted more than a year.

In 1711 Ahmed Karamanli, a popular cavalry officer, seized the city. He was a kouloughli, one of the families descended from Turkish soldiers and local women. He killed the Ottoman governor and had many Turkish officials killed, then used their seized property to buy the sultan’s approval. The sultan later recognised him as pasha; one history dates the formal appointment to 1722.

Ahmed kept the sultan as his overlord in name, but he ran Tripoli as his own kingdom with a mainly Arab government, and he passed it to his sons. He extended his rule east into Cyrenaica and died in 1745. His family, the Karamanlis, ruled until 1835, apart from a short break in the 1790s.

Were Tripoli’s corsairs pirates?

A corsair was a sea raider licensed by his own government, a little like a privateer. Tripoli’s corsairs needed the ruler’s permission to sail, attacked ships of nations the regency was at war with, and shared each prize with the state, the ship’s owners and the crew. That made them very different from the outlaw pirates of the Caribbean in the same years, such as Blackbeard.

Tripoli’s fleet was the smallest on the Barbary Coast. In the late 1600s it had about thirteen ships, against twenty at Tunis and forty at Algiers. It could still do real harm: one count finds 71 ships taken by Tripoli’s corsairs between 1679 and 1685. Captured sailors and passengers were held for ransom or put to work, as in the other regencies. A French surgeon held captive in Tripoli from 1668 to 1675 wrote a long chronicle of the city.

How did treaties and passes protect ships from Tripoli?

A nation could make peace with a regency through a treaty. In 1676 the English admiral Sir John Narbrough made a treaty with the pasha, dey and council of Tripoli. It promised peace and trade, said that English ships showing a pass from the Lord High Admiral could sail on, and banned the taking of people from English ships. Once English ships were safe, Tripoli’s corsairs turned more against the French.

The English consul Thomas Baker, who lived in Tripoli from 1677 to 1685, kept a journal describing an unsettled government, a shrinking treasury and a city that depended on raiding. Under Ahmed Karamanli, some smaller states paid him a yearly sum so that his corsairs would leave their ships alone. Into the 1700s, British captains carried Mediterranean passes, documents that proved a ship was British, so that corsairs at peace with Britain would let her go.

What did Tripoli trade?

The land around Tripoli was too dry to make it rich: a modern study of its corsairs borrows a period English phrase for it, a “sterill country”. Besides prizes and ransoms, the regency lived on salt sold by sea, on payments from inland tribes, and, in the 1600s, on raids for captives along the coasts of southern Italy and Greece.

Tripoli was also the end of one of the great roads across the Sahara. Camel caravans came north through the oases of Fezzan, carrying gold, ivory and enslaved Africans from the lands south of the desert. The traders’ records counted these people as goods; their own stories were rarely written down.

Enslavement ran both ways in the Mediterranean, as the Algiers page explains: Christian states and the Knights of Malta also captured and enslaved many Muslims.

What happened when France bombarded Tripoli in 1728?

France had a treaty with Tripoli from 1720, but in the 1720s Tripoli’s corsairs began taking French ships again. Talks through the French consul failed. In July 1728 a French squadron under Étienne Nicolas de Grandpré anchored off the city, and for about a week its bomb ships threw explosive shells into Tripoli night after night.

Much of the city was wrecked, but the French had no soldiers to land and ran short of bombs, so they sailed away. Ahmed Karamanli stayed in power. In 1736 he began a great mosque in the city, with a school and tombs for his family.

Why do the US Marines sing about “the shores of Tripoli”?

This came long after the game’s era. In 1799 the young United States agreed to pay Ahmed’s descendant Yusuf Karamanli $18,000 a year to keep Tripoli’s corsairs off American ships. Yusuf wanted more, and war broke out in 1801.

On 31 October 1803 the American frigate Philadelphia ran aground off Tripoli and was captured with her crew. On 16 February 1804 Lieutenant Stephen Decatur and about sixty volunteers sailed into the harbour in a captured ketch, the Intrepid, and burned her.

In March 1805 the American agent William Eaton set out from Egypt with a mixed force of Arab and Greek fighters and a handful of US Marines under Lieutenant Presley O’Bannon. After a march of more than 400 miles through the desert they took the port of Derna, far to the east of Tripoli, on 27 April 1805. Peace was signed on 3 June 1805, and the United States paid $60,000 to free the rest of its prisoners. The Marines’ Hymn remembers Derna in its line “to the shores of Tripoli”.

Legend or fact?

Legend says: Ahmed Karamanli killed hundreds of officers at a single banquet.

Records show: This is a popular story. The histories checked for this page say only that he killed the Ottoman governor and many Turkish officials when he seized power in 1711.

Legend says: The Ottoman sultan ruled Tripoli.

Records show: After 1711 the sultan was overlord in name only. The Karamanli pashas ran Tripoli as their own kingdom until 1835.

Legend says: Tripoli’s corsairs were outlaws who attacked anyone.

Records show: They sailed with the ruler’s licence and attacked ships of nations at war with Tripoli. Treaties, like England’s of 1676, protected others.

Legend says: US Marines captured Tripoli in 1805.

Records show: They never took Tripoli. A handful of Marines helped capture Derna, far to the east, and the war ended in a treaty with a payment for prisoners.

Sources

  1. Libya: A Country Study, “The Karamanlis”, Library of Congress Federal Research Division, ed. Helen Chapin Metz. Ahmed Karamanli’s coup in 1711, the killing of Turkish officials and the bought confirmation, his hereditary rule, Cyrenaica, the US payment of 1799 and the end of the dynasty in 1835.
  2. Libya: A Country Study, “Cyrenaica and Fezzan”, Library of Congress Federal Research Division. The Fezzan caravan route carrying gold, ivory and enslaved people north to the Mediterranean.
  3. Tripolitania, Encyclopaedia Britannica. Spanish capture in 1510, the Knights of St John from 1530, Ottoman rule from 1551, the Karamanli pashas from 1711 to 1835 and the war with the US in 1801–1805.
  4. Articles of Peace and Commerce between Charles II and the Bashaw, Dey, Aga, Divan and Governors of Tripoli, Concluded by Sir John Narbrough (printed in London, 1677) (1676). The English treaty of 1676: peace and trade, passes, and no taking of people from English ships.
  5. Philadelphia II (Dictionary of American Naval Fighting Ships), Naval History and Heritage Command. The frigate’s grounding and capture on 31 October 1803 and her burning by Decatur in the Intrepid on 16 February 1804.
  6. Battle of Derna, 27 April 1805: Selected Naval Documents, Naval History and Heritage Command. Eaton’s march from Egypt in March 1805, O’Bannon’s Marines, the capture of Derna and the peace of 3 June 1805 with $60,000 for prisoners.
  7. To the Shores of Tripoli, Leatherneck, Marine Corps Association. The mixed force, the march of more than 400 miles, the small Marine detachment and the Marines’ Hymn.
  8. Libya: Ottoman control, corsairs and Qaramanlis, Fanack. Turgut Reis in 1551, pashas and deys, prize shares, 71 ships taken in 1679–1685, payments to Ahmed, the trans-Saharan slave trade and the sultan’s recognition of Ahmed as pasha eleven years after 1711.
  9. Mosque complex of Ahmad Pasha al-Qaramanli, Archnet. The mosque, school and family tombs begun in 1736.
  10. Tripoli in the late seventeenth century: the economics of corsairing in a ‘sterill country’, Libyan Studies (Cambridge University Press). The period description of Tripoli as a “sterill country” and the poverty of the regency.
  11. European journals and correspondence from early modern Libya, The Silphium Gatherer, citing C. R. Pennell’s edition of Thomas Baker’s journal (Fairleigh Dickinson University Press, 1989) (2021). Thomas Baker, English consul 1677–1685, and the French captive’s chronicle of 1668–1675.
  12. Ottoman Tripolitania, Wikipedia (citing Adrian Tinniswood, Pirates of Barbary, 2011). Additional source: the smallest Barbary fleet, Baker’s shrinking treasury, salt exports and tribute from inland tribes, and the 1676 treaty turning corsairs against France.
  13. Bombardment of Tripoli (1728), Wikipedia (citing Lacour-Gayet, La marine militaire de la France sous Louis XV, 1910, and Weiss, 2002). Additional source: the 1720 treaty, the failed talks, Grandpré’s bombardment of July 1728 and its outcome.
  14. Red Castle of Tripoli, Wikipedia (citing Micara, Il Castello Rosso di Tripoli, 2016). Additional source: the castle as the Knights’ stronghold and the Karamanli pashas’ seat, and a museum today.
  15. La marine militaire de la France sous le règne de Louis XV, Georges Lacour-Gayet (1910). The French squadron under Grandpré and its bombardment of Tripoli in 1728.
  16. Pirates of Barbary, Adrian Tinniswood (2011). The size of Tripoli’s corsair fleet in the later 1600s compared with Tunis and Algiers.
  17. Passes and protection in the making of a British Mediterranean, Journal of British Studies (Cambridge University Press). British Mediterranean passes in the 1700s.
  18. Ahmed Karamanli, Wikipedia (citing Abun-Nasr 1987). Additional source: the killing of the Ottoman governor in 1711 and the instability before it.

Written for Silver & Sails. Facts last checked against these sources on 22 October 2026. Found a mistake? Tell us.