<Li> 2nd Tripoli Harbor </Li> <P> The First Barbary War (1801--1805), also known as the Tripolitanian War and the Barbary Coast War, was the first of two Barbary Wars, in which the United States and Sweden fought against the four North African states known collectively as the "Barbary States". Three of these were nominal provinces of the Ottoman Empire, but in practice autonomous: Tripoli, Algiers, and Tunis . The fourth was the independent Sultanate of Morocco . </P> <P> The cause of the U.S. participation was pirates from the Barbary States seizing American merchant ships and holding the crews for ransom, demanding the U.S. pay tribute to the Barbary rulers . United States President Thomas Jefferson refused to pay this tribute . Sweden had been at war with the Tripolitans since 1800 . </P> <P> Barbary corsairs and crews from the North African Ottoman provinces of Algiers, Tunis, Tripoli, and the independent Sultanate of Morocco under the Alaouite dynasty (the Barbary Coast) were the scourge of the Mediterranean . Capturing merchant ships and enslaving or ransoming their crews provided the Muslim rulers of these nations with wealth and naval power . The Roman Catholic Trinitarian Order, or order of "Mathurins", had operated from France for centuries with the special mission of collecting and disbursing funds for the relief and ransom of prisoners of Mediterranean pirates . According to Robert Davis, between 1 and 1.25 million Europeans were captured by Barbary pirates and sold as slaves between the 16th and 19th centuries . </P>

How did the united states respond to the demands of the barbary pirates
find me the text answering this question