Did you know that in between the Revolutionary War and the War of 1812, America was involved in a conflict with North African Barbary pirates?
As in the earlier Quasi-War with France, the First Barbary War was all about protecting American merchant shipping. The Barbary States—Morocco, Algiers, Tunis, and Tripoli—made a lot of their money through state-sponsored piracy, but nations could be spared the attacks if they paid large tributes to the rulers. Before independence, American merchants were protected by Britain’s agreement with the Barbary leaders, but upon independence, the Americans had to fend for themselves. The first American ship was captured in 1784 by Morocco, and after other ships were captured as well (with their crews often sold into slavery), America decided to make tribute arrangements with the Barbary States. Even though these tributes were huge—taking up a substantial chunk of America’s budget—they didn’t always protect America’s merchants off the coast of North Africa, and ships and their crews were still taken captive.
In late 1800/early 1801, the pasha of Tripoli decided he wanted a bigger tribute. When this didn’t happen, he had the flagpole outside the American consulate in Tripoli chopped down in a declaration of war. In spring 1801, President Jefferson ordered a blockade of Tripoli’s port but didn’t officially declare war. Over the next few years, the American navy maintained a military presence off the coast of Tripoli, trying to put a stop to pirate attacks with limited success. The most famous event from this time involved the USS Philadelphia, which ran aground in October 1804 and was captured by pirates. Not wanting to let the pirates keep the ship, Lieutenant Stephen Decatur and a group of men snuck aboard and burned the ship, making Decatur a hero.
In April 1805, William Eaton, the former U.S. consul to Tunis, and a mixed group of about 400 Arab fighters and Greek mercenaries, as well as eight U.S. Marines, attacked and captured the city of Derna after a two-month trek across the desert. The goal was to oust the current pasha and put his more American-friendly brother in his place. However, before Eaton’s group could reach their goal, American general consul Tobias Lear made an agreement with the pasha to make a final payment of 60 thousand dollars, after which America wouldn’t have to pay him anything else.
Pirate attacks in the region decreased for a while, but in 1815 America fought the Barbary pirates again—this time in Algiers—in the Second Barbary War. But even that didn’t stop piracy altogether, and piracy in the region continued until the 1830s, when France conquered Algeria.