The Viceroyalty of Peru, officially known as the Kingdom of Peru, was a Spanish imperial provincial administrative district, created in 1542, that originally contained modern-day Peru and most of the Spanish Empire in South America, governed from the capital of Lima. Peru was one of the two Spanish viceroyalties in the Americas from the sixteenth to the eighteenth centuries.