During the 18th century, the Barbary states in North Africa would capture merchant ships and demand ransom. Usually, the governments of the captured ships would pay a monetary ransom for the ships’ release. After the American Revolution, Presidents Washington and Adams continued paying tribute, but the piracies continued and the ransoms increased.
After Thomas Jefferson became president in 1801, he rebuilt the deteriorating U.S. Navy and sent ships to confront the Barbary pirates. Commander Andrew Sterrett was in charge of the American ship Enterprise. He defeated the enemy ship Tripoli without suffering a single casualty. Because the U.S. had not officially declared war, Sterrett returned the defeated ship to port and threw its guns overboard instead of capturing it as a prize. The Enterprise won other victories in the same conflict. Another American hero of the Barbary Wars was Lieutenant Stephen F. Decatur, Jr, who led the ship Intrepid. He burned the captured U.S ship Philadelphia to prevent the Tripolitans from using it against the United States. In the spring of 1805, Army Captain William Eaton joined with a deposed Tripolitan leader to march across the desert and capture a Tripolitan city in a joint action with the U.S. Navy.
Meanwhile, U.S. and Danish diplomats were negotiating with Tripoli and made a peace agreement. The U.S. made a final ransom payment of $60,000, and no longer needed to pay tribute after that. The settlement was viewed by the U.S. as a victory for free trade.
Source: The Barbary Wars, 1801-1805
Courtesy Naval History and Heritage Command, Public Domain