In May 1877, Nicolás de Piérola, former Minister of Finance, initiated an attempt to overthrow then-President Mariano Ignacio Prado.
As part of this coup attempt, on 6 May two of his supporters, Colonel Lorranaga and Major Echenique, boarded Huáscar at the port of Callao while the captain and executive officer were ashore.
However, after she forcibly boarded some British merchant ships, British authorities sent HMS Shah and HMS Amethyst, under command of Rear Admiral Algernon de Horsey, to capture the vessel, with authorization and reward offered by the Peruvian government of Mariano Ignacio Prado.
On May 16, it appeared in the port of Antofagasta, Bolivia, where he picked up Nicolás de Piérola, as Supreme Chief of Peru, and his entourage of followers.. Huáscar escaped after a fierce exchange of fire.
This battle saw the first use of the newly invented self-propelled torpedo, which at the time had just entered limited service with the Royal Navy.