The Barbary Wars were two wars fought at different times over the same reasons between the United States of America and the Barbary States of North Africa in the late 18th and early 19th centuries. At issue was the Barbary pirates' demand for tribute from American merchant vessels in the Mediterranean Sea.