Above all, the pirates mock the notion that the U.S. is a superpower, as a bunch of young men, riding tiny boats, lightly armed, seem unstoppable.
All we need to do is declare that for ships on the high sea, a 300-yard radius around the vessels is a limited access zone. Anybody closing in farther without permission will be assumed to be hostile. (source)
and a little on the First Barbary War
In 1795 Algeria came to an agreement with the United States that resulted in the release of 115 sailors they held, at the cost of over $1 million. This amount totaled about one sixth of the entire United States budget, and this amount was demanded as tribute by the Barbary States to prevent further piracy. The continuing demand for tribute ultimately led to the formation of the United States Department of the Navy, founded in 1798 in order to prevent further piracy attacks upon American shipping as well as to end the extremely large demand for tribute from the Barbary States.