Güemes was born in Salta into a wealthy family. His father, Gabriel de Güemes Montero, born in Santander, in the Spanish province of Cantabria, was a learned man and was serving as royal treasurer of the Spanish crown. He got his son to have a good education with private teachers who taught him philosophical and scientific knowledge of his time. His mother was María Magdalena de Goyechea y la Corte, born in Salta. He was sent to study at the Royal College of San Carlos in Buenos Aires. At 23 he started his military career and took part in the defense of Buenos Aires during the British invasions of the Río de la Plata, where Güemes achieved notability when he and his cavalrymen charged and took over the armed British merchantman Justine, moored in shallow waters. After the formation of the first local government junta in the May Revolution of 1810, he joined the army destined to fight the Spanish troops at the Upper Peru, which was victorious in the Battle of Suipacha. He then returned to Buenos Aires and took part in the siege ofMontevideo. Güemes returned to Salta in 1815, and organized the resistance against the royalists employing local gauchos trained in guerrilla tactics. He was appointed Governor of Salta Province and in November of that year, General José Rondeau, appointed leader of the Peru campaign to replace José de San Martín, suffered a defeat and attempted to take weapons from Salta's gauchos. Güemes refused and the Supreme Director of the Provinces of the Río de la Plata, Ignacio Álvarez Thomas, sent troops to help Rondeau. Eventually an agreement was reached, by which Güemes would continue to lead his forces and would help the armies sent from Buenos Aires. Days later, the new Supreme Director Juan Martín de Pueyrredón had to address suspicions about Güemes's ability by travelling to Salta, and was so pleased with what he found that he promoted Güemes to colonel major. Generals José de San Martín and Manuel Belgrano supported Güemes as well. A letter from royalist general Joaquín de la Pezuela to the Viceroy of Peru explained that Güemes's army was waging, "almost with impunity, a slow but tiring and harmful war." At the beginning of 1817, the royalist Marshal José de la Serna marched on Salta Province with a large force of experienced soldiers. Güemes organized a popular army and, on 1 March, retook Humahuaca. The royalist army of 5,400 men, with newly arrived reinforcements, was met with a scorched earth retreat combined with continuous guerrilla attacks. De la Serna arrived in Salta City on 16 April, but the population resisted. Faced with lightning skirmishes, declining morale and the news of San Martín's victory in the Battle of Chacabuco, the royalist troops retreated to the north. Güemes was then left to his own devices, as San Martín was forced to stay in Chile for three years and Belgrano was recalled to Santa Fe Province to fight the federalist supporters of José Gervasio Artigas on behalf of the centralist government of Buenos Aires, now presided by Rondeau. In March 1819 a new royalist army invaded the northwest of Argentina. Güemes did not obtain reinforcements and resorted to extorting money by force from the upper-class landowners of Salta. In February 1820 another wave of Spanish troops invaded San Salvador de Jujuy and Salta, but were eventually repelled. The year 1820 marked a turning point of a long civil war in Argentina, with provinces fighting among themselves and with Buenos Aires, after the fall of the central government following the Battle of Cepeda. Güemes found himself with enemies on two fronts: the royalist troops in the north, and Bernabé Aráoz, governor of Tucumán, in the south. Aráoz had struck an alliance with Salta's rich landowners, opposed to Güemes, and defeated him on 3 April 1821. The Cabildo of Salta, dominated by conservatives, deposed Güemes from the governorship. His gauchos retook power in May. Soon, however, colonel José María Valdés, a Spanish rustler in the service of the royalist army, took advantage of his knowledge of the terrain, promised the landowners to respect their properties, and with their support he occupied Salta again on 7 June. Güemes fled the city, but was shot in the back. He managed to get to his camp at Chamical, gave the last orders to his army and died of his wounds on 17 June. His men retook Salta from the royalists, this time permanently, on 22 July.