1801 - 1815
Did you know that the United States went to war against "pirates"? Yep. It's true.
How It All Started...
Barbary Slave Trade
Barbary state "pirates" would regularly target non-Muslim traders/sailors aboard merchant ships from Europe and America in order to enslave them, ransom them, or convert them to Islam.
It was customary for countries to try to bribe these state backed corsairs not to attack their ships. (Pirates are not state-backed. Corsairs are. They do the same thing...the only difference is the state backing. Corsairs are the same thing as Privateers.)
The bribe would be a sum of money paid annually called a "Tribute". The ruler would demand a certain amount in order to ensure no attacks. But sometimes, after an amount was agreed upon, he would demand more, and sometimes the corsairs would still attack despite the bribe. In other words, paying Tribute was no guarantee of safety.
Slave trade has been part of world history in just about ever part of the world.
During the 1700's and 1800's, the Muslim slave trade off the coast of North Africa proved to be especially dangerous for merchant ships trying to use trading routes with the Mediterranean.
[Europeans referred to the four Muslim states of Algiers, Tunis, Tripoli, and Morocco as the Berbary states (referencing the "berber" people of North Africa). Today we spell it "Barbary".]