With the creation of the Viceroyalty of the Río de la Plata, its 30,000 inhabitants became part of the intendency of Cuyo de Córdoba del Tucumán, but in 1813 the intendency was separated and the Province of Cuyo created, with José de San Martín as its first Governor. He received important support from Mendoza when he led his Army of the Andes from Plumerillo to the 1817 crossing of the Andes, in his campaign to end Spanish rule in Chile.