The First and Second Barbary Wars were a series of conflicts between the United States and the Barbary States in North Africa. At issue was the pirates' demand of tribute from American vessels in the Mediterranean. The United States paid taxes and rights fees to access the Mediterranean sea until the end of the Second Barbary War.