The sale was complex, involving subterfuge to get around embargoes on the purchase of armed vessels by belligerent countries, and was only completed after the war's conclusion.
On 14 February 1879, the Chilean ironclads Almirante Cochrane and Blanco Encalada entered Antofagasta and initiated the War of the Pacific, between Chile and a Bolivian–Peruvian alliance.
[1] As the war ensued, the Peruvian government attempted to source new warships from Europe and discovered two suitable merchant vessels under construction in Germany for a Portuguese client.
The Peruvian authorities then attempted to get the ships sold to the firm of Henry Lambert in London, under the subterfuge that the client was the French government.
Power was provided by compound marine steam engines with horizontally-mounted cylinders that drove two propeller shafts.
[8] Lima was originally constructed by Howaldts of Kiel, Germany as a merchant ship and named Socrates.
[5] Purchased by the Chilean government in 1881, the vessel was initially to be converted into a gunboat and renamed by the German firm but this proved impossible due to restrictions placed on Peru as a belligerent nation.
[12] The vessel was completed in 1885 once the War of the Pacific had finished but, due to financial constraints, did not enter service until 1889.
[15] Due to the threat of a war with Ecuador on 4 April 1910, the cruiser was briefly mobilised but there was no conflict and so the vessel saw no action.
Along with the similarly outdated destroyer Teniente Rodriguez, the gunboat sailed through the Panama Canal and up the Amazon River to Iquitos to act as a floating battery.