Established in 1543, the Viceroyalty of Peru at first included all of South America ... of Spanish colonial authority on the continent, and, by the mid-1820s, the country had lost its territories ...