Battle of Uhud and forced the Meccan lines back, thus leaving much of the Meccan camp unprotected. When the battle looked to be only one step away from a decisive Muslim victory, a serious mistake was committed by a part of the Muslim army, which altered the outcome of the battle. A breach of Muhammad's orders by the Muslim archers, who left their assigned posts to despoil the Meccan camp, allowed a surprise attack from the Meccan cavalry, led by Meccan war veteran Khalid ibn al-Walid, which brought chaos to the Muslim ranks. Many Muslims were killed, and Muhammad himself was badly injured.
Army of the North victory. The battle was favorable to Balcarce even though he again had numerical inferiority (800 royalist against 600 rebels, and in Cotagaita 2,000 royalists against 1,100 rebels). Balcarce earned the rank of brigadier, and the confidence to advance towards the Desaguadero River, border of the viceroyalty in colonial times. Due to internal disagreements Castelli had to dismiss Güemes and his gaucho soldiers. The royalist defenses were left in charge of general José Manuel de Goyeneche, who met with Castelli and signed an armistice to last for forty days from 16 May. The army moved from the encampment at La Laja,