A squadron of U.S. vessels, under the command of Stephen Decatur, Jr., met and engaged the flagship of the Algerine Navy, the frigate Meshuda under Admiral Hamidou.
[2] Stephen Decatur's squadron had left New York on May 20, 1815, with orders to destroy Algerine vessels and bring the Dey of Algiers to terms for attacking American shipping.
After learning that several Algerine cruisers had crossed the Strait of Gibraltar shortly before he did, Commodore Stephen Decatur, Jr. decided to give them chase and cut them off before they could reach Algiers.
[2] Commanding a fleet of nine vessels, he encountered the Algerine flagship Mashouda (also spelled 'Mashuda' or 'Meshuda') of forty-six guns off Cape Gata, Spain.
After receiving damage from the Constellation and with the admiral himself being wounded, the Algerines instead decided to change course and try for the safety of a neutral port along the Spanish coast.