Hundreds of thousands of Europeans were captured by Barbary pirates and sold as slaves in North Africa and the Ottoman Empire between the 16th and 19th centuries.