General José Manuel de Goyeneche was appointed by the viceroy of Perú to command the royalist forces in Upper Peru, who along with the president of the Real Audiencia of Charcas, Vicente Nieto, decided to establish a forward post in Cotagaita under the command of Frigate CaptainJosé de Córdoba y Rojas. These forces were left isolated after the calls for independence of Cochabamba (September 14) and later of Oruro (September 24) in favor of the Junta in Buenos Aires.
The royalist forces comprised the provincial battalion of Potosí, under commander Indalecio González de Socasa; the Puno battalion; veterans of Borbón; the King's Volunteers; dragoons of Chichas and lancers of Cinti. The revolutionary forces included the first battalion under commander Gregorio Perdiel; sixth battalion under commander Carlos Forest, Hunters battalion under commander Manuel Dorrego; Blandengues battalion under commander Abraham González; and the Husars Regiment under commander Martín Miguel de Güemes.
The attack started in the early hours of the morning and ended at 2 pm the same day. Not having been able to dislodge the royalists from their trenches, Balcarce effected an orderly retreat without being chased.
After the Cotagaita action, the revolutionary forces were obligated to retreat towards Tupiza and then Suipacha, to await reinforcement, where later they achieved their first victory at the Battle of Suipacha.