High Quality Content by WIKIPEDIA articles! Created in 1542, the Viceroyalty of Peru (in Spanish, Virreinato del Perú) was a Spanish colonial administrative district that originally contained most of Spanish-ruled South America, governed from the capital of Lima. The Viceroyalty of Peru was one of the two Spanish Viceroyalties in America from the sixteenth to the seventeenth centuries. However, the Spanish did not resist the Portuguese expansion of Brazil across the meridian. The Treaty of Tordesillas was rendered meaningless between 1580 and 1640 while Spain controlled Portugal. The creation of Viceroyalties of New Granada and Rio de la Plata reduced the importance of Lima and shifted the lucrative Andean trade to Buenos Aires.