The Barbary Wars. American independence lost American ships their shield: no longer covered by Britain's agreements, their merchantmen in the Mediterranean became prey to the Barbary States - the North African regencies of Algiers, Tunis, Tripoli and Morocco - whose corsairs took ships and crews for ransom and tribute. By the 1790s the United States was paying a fifth of its federal budget in tribute; and in 1801, when Jefferson refused the Pasha of Tripoli's raised demands, the Pasha chopped down the flagstaff of the American consulate - the Barbary declaration of war.
Jefferson, the frugal apostle of small government, answered with the navy. For four years American squadrons blockaded and bombarded Tripoli. The war made its legends: the frigate Philadelphia, grounded and captured in Tripoli harbor in 1803, was boarded and burned in a daring night raid led by Stephen Decatur - 'the most bold and daring act of the age,' Admiral Nelson called it. And in 1805 the consul William Eaton and Lieutenant Presley O'Bannon led a polyglot mercenary column and eight Marines on a five-hundred-mile desert march to storm Derna - 'to the shores of Tripoli,' as the Marines' hymn still sings.
The war ended in 1805 with a treaty that freed the Philadelphia's crew and ended tribute to Tripoli - though ransom was still paid, and Algerine corsairs kept taking American ships until 1815, when Decatur returned with a squadron and dictated peace to Algiers, Tunis and Tripoli in a single summer, ending American tribute to the Barbary States forever.
The Barbary Wars were the young republic's first wars overseas, and they made the United States Navy: its first heroes, its first doctrine - that a republic could and would fight far from home rather than pay - and the Marine Corps' oldest song. 'Millions for defense, but not one cent for tribute,' the cry of the XYZ crisis, was here made national policy under sail.