José Manuel de Goyeneche, 1st Count of Guaqui

José Manuel de Goyeneche y Barreda, 1st Count of Guaqui (June 12, 1776, in Arequipa, Viceroyalty of Peru – October 10, 1846 in Madrid ) was a Spanish soldier and diplomat.

Early life
His father was captain of cavalry Juan de Goyeneche y Aguerrevere and his mother was María Josefa de Barreda y Benavides, daughter of field marshal Don Nicolás de Barreda y Ovando, from a noble family of military men and conquistadors. He travelled when very young to Spain, to finish his studies, and entered the army as cadet, later raising to lieutenant of cavalry and captain of grenadiers. He took part of the defense of Cádiz against the British in two occasions, having been in command of two hundred grenadiers and two gun batteries in the second.

Representative to the Supreme Junta
In 1808, during the French invasion of the Iberian peninsula, he was commissioned as representative of the legitimate government of Spain to the Supreme Junta in Seville with the rank of brigadier, for the proclamation of king Ferdinand VII in the viceroyalties of Peru and River Plate, to ensure the fidelity and compliance of those colonies to the legitimate Spanish king, take the news of the general revolt against French invasion of Spain and ask of help from the colonies. His powers were vast, including firing and incarcerating anybody in public office (including viceroys) who manifested any opposition to Ferdinand VII, legitimate King of Spain.

War in Upper Peru
He travelled to Peru, where viceroy Abascal named him Captain General and interim president of the Real Audiencia of Cusco. In 1809 he took command of the Peruvian royalist armies in Upper Peru, sent to suppress the revolutionary forces at La Paz, even though this province belonged the Viceroyalty of the Río de la Plata. He defeated those forces and ordered the execution of a dozen of their leaders, then returned to Cusco.

After receiving news of the May Revolution in Buenos Aires, Viceroy Abascal announced the incorporation of Upper Peru (present-day Bolivia) to the Viceroyalty of Peru. General Goyeneche organized new forces but did not advance South until after the Battle of Suipacha, which left the region under control of the revolutionaries. In May 1811 he signed an armistice with the political leader of the independentist army Juan José Castelli, even though events betrayed that neither one was intending to abide by it. Castelli deployed part of his troops to try to surround Goyeneche's forces, but Goyeneche employed his time better and attacked first. The ensuing battle of Huaqui on June 20, 1811, was a decisive victory for Goyeneche.

In a few weeks afterwards he occupied the whole of Upper Peru, including the cities of La Paz, Cochabamba, Chuquisaca and Potosí, re-establishing Spanish control over the territory. His decisive victory at the Battle of Huaqui earned him the title of Count of Guaqui.

The rebellion at Cochabamba took a year to suppress which delayed his invasion of the Salta Province, in present-day northern Argentina. After defeating the tough resistance of the Cochabamba locas, including women fighters he entered the city and repressed the rebel with severity which cost the lives of dozens of men, women and children.

In 1813, general Pío de Tristán, under orders from Goyeneche, chased the Army of the River Plate South to Argentine territory. Tristán attacked the Belgrano's Army of the North and was defeated at the Battle of Tucumán. A few months later, Tristán was defeated again at the Battle of Salta, falling prisoner along with his whole army. Goyeneche's armies were left unprotected in their southern flank, which forced him to retreat towards Oruro. Goyeneche resigned as commander in chief and was substituted by Joaquín de la Pezuela, returning to Spain shortly afterwards.

Return to Spain
Upon returning to Spain, he was named Lieutenant General of the Royal Armies, member of the Junta for the Wars in the Indies, member of the War Council and president of the Junta for Overseas Commerce. He was also elected as deputy to the Cortes for Arequipa and senator of the realm for the province of Canarias. King Ferdinand made him a peer, and also Knight of the Military Order of Santiago.

He died in Madrid in 1846. His remains are interred in the family crypt at the Saint Isidore Cemetery in the Spanish capital.