deposing Viceroy Cisneros at Buenos Aires. The name "Provincias del Río de la Plata" was formally adopted in 1810 during the Cortes of Cádiz to designate the Viceroyalty based on popular sovereignty. The revolution in Buenos Aires spread across the Spanish Provincias del Río de la Plata, against the resistance of Paraguay (which declared itself an independent nation in 1811) and the Upper Peru (which remained controlled by royalist troops from Lima, and was eventually re-incorporated into the Viceroyalty of Peru). Meanwhile, the Governor of Montevideo Francisco Javier de Elío, appointed as a new "Viceroy" by the Spanish Government in 1811, declared the Buenos Aires Junta seditious. However, after being defeated at Las Piedras, he retained control only of Colonia del Sacramento and Montevideo. He departed by ship to Spain on 18 November and resigned in January 1812. By 1814, as the revolutionary patriots entered Montevideo, following a two-year-long siege. The Viceroyalty was disestablished in 1825 as Spanish political entity with the fall of Upper Peru with the death of the last Viceroy Pedro Antonio Olañeta. History Origin and creation In 1680, Manuel Lobo, Portuguese governor of Rio de Janeiro, created the Department of Colonia and founded Colónia do Sacramento. The fort was located on the coast of present-day Uruguay and developed as the department's capital. Lobo's chief objective was to secure the Portuguese expansion of Brazil beyond the 1494 Treaty of Tordesillas, which had defined areas of influence in the Americas between the Iberian nations. From 1580 to 1640, Spain had controlled Portugal and thus all of its territories in America. In 1681 José de Garro quickly attacked and seized the new fort for Spain. On 7 May 1681, under the Provisional Treaty of Lisbon, it was ceded to Portugal. The Viceroyalty of Peru was requiring all commerce to go through the port of Lima, on the Pacific Ocean. This policy failed to develop the potential of Buenos Aires as an Atlantic port, adding months to the transport of goods and commodities in each direction. It resulted in encouraging widespread contraband activities in the eastern region, especially in Asunción, Buenos Aires and Montevideo. Under these conditions, Viceroy Manuel de Amat y Junyent issued a decree for the former governor of the Río de la Plata, Pedro Antonio de Cevallos, to found the new viceroyalty in August 1776. The ruling was resisted by the elite of Lima, but it was