The Battle of Yavi (also called "the Surprise at Yavi") took place on November 15, 1816, and was one of the military battles to obtain Argentina's independence from Spain.
The Army of the North was defeated at the battle. As a result, the northern border of the Argentine territory collapsed and the provinces of Salta and Jujuy were invaded by the Spaniards. The government in Buenos Aires decided then to continue the fight for independence through the Pacific flank (present-day Chile), under the command of General San Martín, while Salta's caudilloMartin Miguel de Guemes led a guerrilla war to keep at bay the royalist army in the northern provinces. This campaign is retrospectively known as La Guerra Gaucha ("The Gaucho War") after a 1905 novel by Leopoldo Lugones.