Also, on a number of occasions in the early 19th century, American and British warships had to attack the Barbary pirates to stop their piracy and recover thousands of enslaved Europeans and Americans.
[