This question is meant to address the First Barbary War that was fought between 1801-1805. The protection of American vessels in the Mediterranean Sea was urgent when President Jefferson was inaugurated in 1801. Pirates were capturing American commercial vessels and plundering the goods and kidnapping the crew. The pirates came from the Barbary Coast, or four regencies of the Ottoman Empire: Morocco, Algeria, Tunisia, and Tripoli. These governments were charging the United States a tribute to protect American vessels from corsair (piracy.) Congress approved the payment of tributes before Jefferson was elected, but payment was not delivered in a timely fashion. Jefferson, early in his presidency, had sent a fleet of naval ships towards Tripoli with letters assuring the payments were forthcoming. Tripoli, unfortunately, did not wait for the messages and declared war on the United States.