The city of Palma, located on the island of Sardinia, was a frequent victim of Barbary Pirate attacks. One particular attack, in which a band of Tunisian pirates sacked the city in 1815, and took 158 prisoners, aroused widespread condemnation throughout Europe, and marked the beginning of the end for these corsairs.
After the sacking of Palma, European powers in the region worked together to rid the Mediterranean of the corsairs. In 1816, the British general Lord Exmouth sailed to Algiers and Tunis and demanded an end to the pirate attacks. After he received promises from the pashas of those cities, he learned that a large number of British captives had been tortured by the pirates while he sailed back to England. Exmouth quickly returned to the region with a fleet of battleships, and an additional force of Dutch ships and brutally bombarded the pirate stronghold of Algiers. Following the partial destruction of Algiers, the pirates relinquished control of over 3,000 captives and pirate attacks declined in frequency. Pirating was completely finished off in 1830 when French forces, along with an uprising of Christian slaves, occupied Algiers.