The Barbary pirates, sometimes called Barbary corsairs or Ottoman corsairs, were pirates and privateers who operated from North Africa, based primarily in the ports of Salé, Rabat, Algiers, Tunis, and Tripoli. This area was known in Europe as the Barbary Coast, a term derived from the name of its Berber inhabitants. Their predation extended throughout the Mediterranean, south along West Africa's Atlantic seaboard and even South America, and into the North Atlantic as far north as Iceland, but they primarily operated in the western Mediterranean. In addition to seizing ships, they engaged in Razzias, raids on European coastal towns and villages, mainly in Italy, France, Spain, and Portugal, but also in the British Isles, the Netherlands and as far away as Iceland. The main purpose of their attacks was to capture Christian slaves for the Ottoman slave trade as well as the general Arabic market in North Africa and the Middle East.While such raids had occurred since soon after the Muslim conquest of the region, the terms Barbary pirates and Barbary corsairs are normally applied to the raiders active from the 16th century onwards, when the frequency and range of the slavers' attacks increased. In that period Algiers, Tunis and Tripoli came under the sovereignty of the Ottoman Empire, either as directly administered provinces or as autonomous dependencies known as the Barbary States. Similar raids were undertaken from Salé and other ports in Morocco.Corsairs captured thousands of ships and repeatedly raided coastal towns. As a result, residents abandoned their former villages of long stretches of coast in Spain and Italy. The raids were such a problem that coastal settlements were seldom undertaken until the 19th century. From the 16th to 19th century, corsairs captured an estimated 800,000 to 1.25 million people as slaves. Some corsairs were European outcasts and converts such as John Ward and Zymen Danseker. Hayreddin Barbarossa and Oruç Reis, the Barbarossa brothers, who took control of Algiers on behalf of the Ottomans in the early 16th century, were also notorious corsairs. The European pirates brought advanced sailing and shipbuilding techniques to the Barbary Coast around 1600, which enabled the corsairs to extend their activities into the Atlantic Ocean. The effects of the Barbary raids peaked in the early to mid-17th century.The scope of corsair activity began to diminish in the latter part of the 17th century, as the more powerful European navies started to compel the Barbary States to make peace and cease attacking their shipping. However, the ships and coasts of Christian states without such effective protection continued to suffer until the early 19th century. Following the Napoleonic Wars and the Congress of Vienna in 1814–15, European powers agreed upon the need to suppress the Barbary corsairs entirely and the threat was largely subdued. Occasional incidents occurred, including two short Barbary wars between the United States of America and the Barbary States, until finally terminated by the French conquest of Algiers in 1830.