The Spanish Empire subordinated the economic potential of the Argentine territory to the immediate wealth of the silver and gold mines in Bolivia and Peru, and as such it became part of the Viceroyalty of Peru until the creation of the Viceroyalty of the Río de la Plata in 1776 with Buenos Aires as its capital.