 The patriotic left wing, commanded by Diaz Velez, faced the bulk of the royalist forces, while the center was hit by the soldiers of Pio Tristan.Many patriotic soldiers recruited at Upper Peru surrendered or fled, and many of the recruits from La Paz switched sides during the battle.The Saavedrist Juan José Viamonte helped ensure Castelli's defeat by refusing to join the conflict.