Five days later the royalist army arrived, commanded by General Joaquín de la Pezuela, to fight at the Battle of Ayohuma. The rebel army, with 2,000 men and 8 pieces of artillery (even though they counted 3,400 men, 1,400 were not in fighting conditions) they confronted a superior army with 3,500 men and 18 pieces of artillery. The fight was bloody for both sides, with a rebel defeat, but they were not chased by the royalists as they had suffered 500 loses and after a very trying battle. As a consequence of these defeats, Upper Peru returned to royalist control and Belgrano returned to Jujuy.