Barbary was not always a unified political entity.
From the 16th century onwards, it was divided into the
political entities of the Regency of Algiers, Tunis, and Tripolitania (Tripoli). Major rulers and petty monarchs during the times of the Barbary States' plundering parties included the Pasha or Dey of Algiers, the Bey of Tunis and the Bey of Tripoli.[3]
Purchase of Christian captives in the Barbary States
The first military land action overseas by the United States, was executed by the US Marines and the US Navy at the Battle of Derna, Tripoli, a coastal town now in eastern Libya, in April 1805. It formed part of an effort to destroy all Barbary pirates, to free American slaves in captivity and end piracy acts between the warring tribes on the part of the Barbary states, which were themselves member states of the Ottoman Empire. The opening line of the Marines' Hymn refers to this action: "From the halls of Montezuma to the shores of Tripoli..." It was the first time that the US Marine Corps took part in offensive actions outside the United States.