Portrait of Thomas Jefferson.

Thomas Jefferson was President during the First Barbary War.

First Barbary War


The First Barbary War (1801-1805) was the first overseas war conducted by the United States. The nations on the Barbary Coast of Morocco involved were Algiers, Tunis and Tripoli. The war ended in victory for the United States, with peace treaties between the three Barbary States and Morocco.



The First Barbary War (1801-1805) was the first overseas war fought by the United States. It happened during the Presidency of Thomas Jefferson. Also known as the Barbary Coast War or the Tripolitan War, it pitted the United States against pirates from the nations known collectively as the Barbary States:

  • Algiers
  • Morocco
  • Tunis
  • Tripoli

The incident arose over tributes that were customarily paid to these nations by U.S traders. In 1801, Tripoli increased demands for payment. President Jefferson refused the demand and Tripoli declared war on the United States by cutting down the flagstaff in front of the U.S. Consulate.

Congress authorized the use of military force for the protection of American interests in the Mediterranean. On August 1, 1801, the USS Enterprise defeated the Tripoli at sea. In 1802, Jefferson increased the presence of the Navy in the area by deploying additional ships under the command of Commodore Edward Preble.

On July 14, 1804, under Preble’s command, the Navy attacked Tripoli, but the most famous event of the war occurred in April and May of 1805 with the Battle of Derma. General William Eaton and First Lieutenant Presley O’Bannon led a force of eight Marines and 500 mercenaries from Alexandria, Egypt across the desert to the city of Derma, which they laid siege to. Upon their victory, the American flag was raised. This marked the first time it had been done in victory on foreign soil.

The events of the First Barbary War are memorialized by the line in the Marine’s Hymn, “the shores of Tripoli” and the Tripoli Monument that stands at the U.S. Naval Academy in Annapolis, Maryland.

Suggested Reading

We recommend the following books about the Barbary Wars. Please note that American History Central may earn a commission from these links.


Citation Information

The following information is provided for citations.

  • Article Title First Barbary War
  • Coverage 1801–1805
  • Author
  • Keywords first barbary war, barbary coast war, tripolitan war, jefferson overseas war, barbary pirates
  • Website Name American History Central
  • Access Date January 19, 2022
  • Publisher R.Squared Communications, LLC
  • Original Published Date
  • Date of Last Update December 10, 2021
By signing up for this email, you are agreeing to receive news, offers, updates, and additional information from R.Squared Communications, LLC and American History Central. Easy unsubscribe links are included in every email.