In the 16th century, Spain conquered the Inca Empire and established the Viceroyalty of Peru, which included much of the territory of present-day Peru, Ecuador, Bolivia, Chile, and Argentina. The Viceroyalty of Peru was ruled from Lima, which was founded by Spanish conquistadors in 1535 and served as the capital of the Spanish Empire in South America.
Peru gained its independence from Spain in 1821, and became a republic in 1822. The country's history since then has been marked by periods of political instability and military rule, as well as periods of economic growth and development.
In recent decades, Peru has made significant progress in reducing poverty and improving its economic and social indicators. However, the country continues to face challenges related to corruption, inequality, and political polarization.