The first Barbary war attempted to stop the practice .
This stoppage proved temporary but the second Barbary war finally stopped it .
The first Barbary war attempted to stop the practice but this stoppage proved temporary but the second Barbary war finally stopped it .