José de San Martín was defeated by the Luso-Brazilian armies, his allies Estanislao López and Francisco Ramírez continued hostilities against Buenos Aires for its inactivity against the invasion. Pueyrredón called the Army of the Andes and the Army of the North (led by Belgrano) to aid Buenos Aires in the conflict. Guido noted to San Martín that if both armies did that, the north of Argentina and Chile would be easily reconquered by the royalists. San Martín also knew that most of the soldiers of the Army of the Andes would not be willing to aid Buenos Aires in the civil war, as most
Army of the North Goyeneche and Joaquín de la Pezuela, an able and experienced soldier, had the advantage, he negotiated with Goyeneche a 40-day armistice. The Assembly in Buenos Aires and the viceroy of Peru, José Fernando de Abascal, disapproved of this agreement. The royalists attacked by surprise, disregarding the agreement, before the arrival of reinforcements at the Battle of Vilcapugio on 1 October 1813. The royalist army, commanded by brigadier Joaquín de la Pezuela and with 4,000 men and 12 pieces of artillery confronted a patriot army with a high morale composed of 3,500 men, 14 pieces of artillery and cavalry mounted mostly