Battle of Moquegua

After José de San Martín had abandoned Peru in September 1822, command of the United Peruvian army fell to General Rudecindo Alvarado, under whose command the United army was ordered to defeat the bulk of the Royalist troops that were still intact in the south and the country's mountains.

In the first days of October, Alvarado's expedition, composed of approximately 4,300 troops and 10 pieces of artillery, sailed from Callao and on 6 December, landed in Arica.

Spanish Viceroy José de la Serna, located in Cusco, ordered Brigadier Gerónimo Valdés to immediately march to Arequipa to take command of the troops stationed there, and attack the army of Alvarado.Both armies met at Torata and the Battle of Torata ended in a defeat for the Patriots.

But the Royalists, knowing that reinforcements under command of General José de Canterac were very close, did not plan to let victory, that was considered certain, slip away.

[3] The surviving Patriots retreated to Iquique, where they were attacked by General Olañeta, and lost an other 100 men, before being able to embark at Ilo to return to Lima.