In Search Of History - Pirates Of The Barbary Coast (History Channel Documentary)
"While the Moroccan pirates cooperated, Ottoman Algerian leader Dey Mohammed ben-Osman declared war on the United States, capturing a merchant ship in 1784, and offered to assume peaceful relations only if the U.S. government could pay him a tribute. Though the U.S. was able to negotiate a treaty with Morocco in 1786, Congress didn’t have the money to pay off Mohammed, according to records held by the U.S. State Department.
Luckily for then-President George Washington, Portugal was warring with Algiers and protected U.S. merchant ships — until 1793, when the two states reached a truce, opening American vessels up to attack once more."