Answer:
The Barbary War was an war waged by the United States against the North African states of Morocco. The cause of the war was that those states harbored and supported the actions of pirates against American shipping vessels in the Mediterranean Sea.