In the late 1700s and early 1800s the great powers of Europe took a stance of appeasement towards the Barbary States, giving them tribute to ward off pirate attacks. American commerce had been under the protection of British ships before the American Revolution and French ships during it under the Treaty of Alliance, but upon independence they were unprotected and subject to pirate attack. By the early 1800s the United States was spending almost a fifth of its budget on tribute to the Barbary States, resulting in President Jefferson ordering forces to the Mediterranean to suppress the pirates and marking the start of the Barbary Wars. The fight against the pirates of Libya went on to be enshrined in the second line of the Marines' Hymn, which refers to the shores of Tripoli. Given that the United States wasn't the largest naval power of the time and was operating out of foreign bases I'm wondering why it took the United States, Sweden, and Sicily to suppress piracy in the area. Why didn't France, Spain, and/or the United Kingdom move to suppress it themselves given their significant interests and proximity to the area?