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. After the battle of Torata, the Patriot army retreated to the town of
Moquegua with the intention of reorganizing its forces. 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. After the arrival of the division of General Canterac, the Royalist army went on the offensive. == the Battle ==