The Barbary Coast is a name for the North African coast of the Mediterranean Sea. From the 16th to the 19th centuries, Barbary pirates were a serious threat to shipping in the Mediterranean. They would attack ships and demand protection money from the owners. Those who refused would have their ships captured and their crews taken as slaves.