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:
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 hte 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 Hymm, “the shores of Tripoli” and the Tripoli Monument that stands at the U.S. Naval Academy in Annapolis, Maryland.