Second Barbary War

Following a decisive U.S. victory off the coast of Cape Gata in June 1815, and by threat of seizing Algiers itself, Commodore Decatur successfully pressed Dey Omar Agha of Algeria to sue for peace; the resulting agreement was formalized in a treaty ratified by the U.S. Senate on 5 December 1815.

[4] The Algerian War resulted in the United States and Europe ceasing tribute to Algiers and marked the beginning of the end of piracy in the Mediterranean.

Western nations built ever more sophisticated and expensive ships that the Barbary pirates could not match in numbers or technology, and the French conquest of Algeria in 1830 fully ended any vestige of piracy in the region.

The Barbary pirates returned to their practice of attacking American merchant vessels in the Mediterranean Sea and ransoming their crews to the United States government.

On 3 March 1815, Congress authorized deployment of naval power against Algiers, and the squadron under the command of Commodore Stephen Decatur set sail on 20 May.

It consisted of USS Guerriere (flagship), Constellation, Macedonia, Epervier, Ontario, Firefly, Spark, Flambeau, Torch, and Spitfire.

[11] Shortly after departing Gibraltar en route to Algiers, Decatur's squadron encountered the Algerian flagship Meshouda and captured it in the Battle off Cape Gata.

[11] In early 1816, Britain undertook a diplomatic mission, backed by a small squadron of ships of the line, to Tunis, Tripoli, and Algiers to convince the Deys to stop their piracy and free European Christian slaves.

The leader of the diplomatic mission, Admiral Edward Pellew, believed that he had negotiated a treaty to stop the slavery of Christians and returned to England.