The Barbary Wars: How America Battled the Barbary Pirates

Long before America fought on the beaches of Normandy or the deserts of Iraq, its sailors and Marines were fighting overseas in North Africa. The Barbary Wars were the young nation’s first great test abroad. They gave the U.S. Navy its early heroes, gave the Marine Corps the famous line “to the shores of Tripoli,” and saw the Stars and Stripes raised over a captured fortress in the Old World for the first time. Here is the story of how America refused to keep paying tribute to the Barbary pirates.

American warships battling Barbary pirates off the coast of North Africa

Who Were the Barbary Pirates?

The “Barbary Coast” was the Mediterranean shore of North Africa, home to four states: Morocco, which was independent, and Algiers, Tunis and Tripoli, which were semi-independent provinces of the Ottoman Empire. For centuries, their rulers sponsored corsairs, state-backed pirates who attacked merchant ships, seized their cargoes and held the crews for ransom or sold them into slavery.

The corsairs’ reach was astonishing. They raided coastal villages in Italy, Spain and France, and in the 1600s they struck as far away as Ireland and Iceland, carrying off hundreds of captives at a time. Rather than fight, most European nations found it cheaper to pay the Barbary rulers yearly “tribute” in exchange for safe passage for their ships.

A New Nation Without Protection

Before 1776, American colonial merchant ships sailed under the British flag and were covered by Britain’s tribute payments. Independence ended that protection. In 1784, Moroccan corsairs seized the American brig Betsey, and the next year Algiers captured the Maria and the Dauphin. Their crews would spend more than a decade in captivity.

In 1786, Thomas Jefferson and John Adams, then America’s ministers in Europe, met in London with Tripoli’s envoy to ask why his country attacked a nation that had done it no harm. The envoy answered that his government believed it had the right to make war on any nation that had not made a treaty with it. Jefferson came away convinced that paying tribute only invited more demands. Adams believed paying was cheaper than war. For the moment, Adams’s view won out.

Through the 1790s, the United States signed treaties with Algiers, Tripoli and Tunis that included large ransom payments, gifts and annual tribute in money, naval stores and even warships. By some estimates, these payments amounted to as much as a fifth of the federal government’s yearly revenue. The threat also helped persuade Congress to pass the Naval Act of 1794, which authorized the first six frigates of the new United States Navy, including the USS Constitution.

The First Barbary War (1801–1805)

When Thomas Jefferson became President in 1801, the Pasha of Tripoli, Yusuf Karamanli, demanded a larger payment. When the Americans refused, his men chopped down the flagpole at the U.S. consulate, Tripoli’s way of declaring war. Jefferson responded by sending a naval squadron to the Mediterranean.

The Loss and Burning of the USS Philadelphia

In October 1803, the frigate USS Philadelphia ran aground on an uncharted reef while chasing a corsair off Tripoli. Captain William Bainbridge and roughly 300 officers and men were taken prisoner, and the Tripolitans floated the ship off the reef to use against the Americans.

On the night of February 16, 1804, Lieutenant Stephen Decatur led a small volunteer crew into Tripoli harbor aboard a captured ketch renamed the Intrepid. Disguised as Maltese sailors, they slipped alongside the Philadelphia, boarded her, set her ablaze and escaped under fire without losing a man. Britain’s great admiral Horatio Nelson reportedly called it the most bold and daring act of the age. Decatur, just 25, became a national hero.

“To the Shores of Tripoli”: The Battle of Derna

In 1805, former Army officer and diplomat William Eaton hatched a daring plan. He would join forces with Hamet Karamanli, the Pasha’s exiled older brother and rightful heir, to strike Tripoli by land. At Alexandria, Egypt, Eaton assembled a small army of a few hundred Arab, Greek and other mercenaries, led by a detachment of U.S. Marines under First Lieutenant Presley O’Bannon.

The force marched more than 500 miles across the Libyan desert, enduring hunger, thirst and mutinies along the way. On April 27, 1805, supported by the guns of the USS Argus, Hornet and Nautilus, they stormed the port city of Derna. O’Bannon and his Marines took the harbor fortress, hauled down the enemy’s flag and raised the 15-star, 15-stripe American flag. It was the first time the Stars and Stripes had flown over a captured fortress in the Old World in time of war.

U.S. Marine Corps flag flying outdoors

The victory at Derna pushed the Pasha to make peace, and a treaty was signed in June 1805. The Marines never forgot it. The line “to the shores of Tripoli” in the Marines’ Hymn honors O’Bannon’s men. Marine Corps tradition holds that Hamet presented O’Bannon with a curved Mameluke sword, and since 1826 Marine officers have carried a Mameluke-style sword as a symbol of that heritage.

The Second Barbary War (1815)

While the United States was busy fighting Britain in the War of 1812, the Dey of Algiers resumed attacks on American ships. Once that war ended, President James Madison sent Stephen Decatur, now a commodore, back to the Mediterranean with a powerful squadron.

Decatur moved fast. He captured the Algerian flagship and another warship, sailed into Algiers harbor and dictated a treaty in a matter of weeks in the summer of 1815. Algiers released its American captives and gave up any claim to tribute. Tunis and Tripoli soon agreed to similar terms. From then on, an American flag at the masthead meant a ship was to be left alone, and the United States never paid Barbary tribute again.

Why the Barbary Wars Still Matter

  • They were America’s first overseas wars and the first major test of the young U.S. Navy and Marine Corps.
  • They produced some of the Navy’s earliest heroes, including Stephen Decatur, William Bainbridge, Edward Preble and Isaac Hull.
  • They put into practice a slogan Americans had first rallied around during the 1798 XYZ Affair with France: “Millions for defense, but not one cent for tribute.”
  • They gave the Marines the “shores of Tripoli” and a proud tradition carried into every war since.

Frequently Asked Questions About the Barbary Wars

Who were the Barbary pirates?

They were state-sponsored corsairs from the North African states of Morocco, Algiers, Tunis and Tripoli who captured ships and held their crews for ransom or slavery from the 1500s into the early 1800s.

Why did the United States fight the Barbary States?

After independence, American ships lost British protection and were attacked by Barbary corsairs. The U.S. paid tribute for years, but when Tripoli demanded more in 1801, President Jefferson refused and sent the Navy.

What does “to the shores of Tripoli” mean in the Marines’ Hymn?

It honors First Lieutenant Presley O’Bannon and his Marines, who helped capture the city of Derna in Tripoli’s territory on April 27, 1805, during the First Barbary War.

What flag did the Marines raise at Derna?

They raised the 15-star, 15-stripe flag of the United States, the same design that later flew over Fort McHenry and inspired “The Star-Spangled Banner.”

When did the U.S. stop paying tribute to the Barbary States?

The United States ended tribute for good after Stephen Decatur’s victory over Algiers in the Second Barbary War in 1815.

Who burned the USS Philadelphia?

Lieutenant Stephen Decatur and a volunteer crew burned the captured frigate in Tripoli harbor on February 16, 1804, so it could not be used by the enemy.

Fly the Flags of America’s First Overseas Victory

Honor the sailors and Marines of the Barbary Wars with the 15-Star Star-Spangled Banner Flag, the same design O’Bannon raised at Derna. You can also fly the U.S. Marine Corps Flag or the First Navy Jack, a symbol of the early U.S. Navy.

Thanks for reading! We hope you enjoyed our post. Please share with all your fellow patriots. Brought to you by: Ultimate Flags