“to the shores of Tripoli” isn’t a part of the Marine Corps hymn for nothing.
In the late 1700s, the newly independent republic of the United States was continually beset by piracy at sea from four Muslim Barbary Coast states: Algiers, Tunis, Tripoli, and Morocco. The U.S., with limited military resources and staggering debts from the War for Independence, sought to establish secure routes for international commerce to spur rapid economic growth needed to build the emerging country. Yet the U.S. faced constant Ottoman attacks on its merchant ships. American and European ships venturing into the region routinely faced capture of crewmembers, who risked being held as slaves until hefty ransoms were paid. The persistent Barbary pirate raids created a major crisis for a new nation that could not afford to either suffer from economic isolation or pay the exorbitant tributes demanded by the pirates.
In Thomas Jefferson and the Tripoli Pirates (Sentinel, 2015), coauthors Brian Kilmeade and Don Yaeger explore “the forgotten war that changed American history.”