The First and Second Barbary Wars were a series of military conflicts between the North African States and the United States. The sovereign authorities in these states demanded that all ships crossing or using their harbors pay duties and tax when traveling in their sovereign waters in the Mediterranean Sea. When the United States refused to pay, merchant vessels were seized by local Tripolitanian authorities and their crews were held for trial for trespassing.