Initially, both modern states of Argentina and Bolivia were part of the Viceroyalty of the Río de la Plata.
Buenos Aires ousted the viceroy in 1810, during the May Revolution, one of the starting points of the Spanish American wars of independence.
The Upper Peru was heavily disputed during this war, and Buenos Aires sent three ill-fated military campaigns to secure the zone.
The expansionist incursions of Andrés de Santa Cruz, head of the Peru-Bolivian Confederation, led both countries to war.
Argentina faced instead the French blockade of the Río de la Plata, imposed by France to support Santa Cruz.