In 1817 San Martín and the independence revolutionaries had taken Santiago, however Royalists still controlled the South of the country. Over the next three years San Martín and O’ Higgin’s forces would fight against the Spanish Royalist troops. At the same time, San Martín and O’Higgins began acquiring ships in preparation for a naval attack on Peru. The need for a naval fleet was clear, since the first independent government in Chile had been overturned by a naval invasion that brought Royalist troops from Peru. Thus the patriots built up their own naval fleet both to secure Chile and also in preparation for their own invasion of Peru. Some of the vessels were captured from the Spanish and others were bought from US and from Britain, which also provided naval officers, such as the Scottish Lord Thomas Alexander Cochrane, who was to prove instrumental in quelling the Spanish Royalists in the South. This squadron of ships was built up between 1817 and 1820. Almost all of the officers were British or North American. In the podcast above Natalia Sobrevilla Perea speaks about the involvement of Englishmen in the Wars of Independence.
One of the naval strategies employed by the patriots, was to curtail Peruvian trading and thereby weaken its economic strength, by taking merchant ships. The patriots incentivised sailors by allowing them to keep the ships and cargoes that they seized. This kept morale high and provided a sustained financial blow to Peru. This attack on commerce was a tactic often used by the British.
San Martín became commander in chief of the army which would go on to try to liberate Peru. He was fully supported by O’Higgins and in 1820 San Martín’s naval fleet set sail for Peru. Lord Cochrane had raided a Spanish Naval installation in the South of Chile, thus ensuring that there was little danger of the enemy attacking from the South. The independence fighters were able to take Lima but the Highlands proved to be a Royalist stronghold.
Rosas, Claudia. El miedo en el Perú. Siglos XVI-XX. Lima: Pontificia Universidad Católica del Perú, Seminario Interdisciplinario de Estudios Andinos, 2005.