Conflict between the United States and Tripoli (now in Libya), known as the Tripolitan War (1801–05), was sparked by American resistance to continuing paying tribute to the piratical rulers of the North African Barbary States of Algiers, Tunis, Morocco, and Tripoli.