Why a desert coastline became the City of Kings
If you were designing a Peruvian capital from scratch with no history attached, Cusco would be the obvious pick: it already had the roads, the administrative infrastructure, the population, the altitude that Andean life was built around. The Spanish picked somewhere else entirely. Francisco Pizarro founded Lima on January 18, 1535, on a stretch of coastal desert with almost none of that — and the choice, once you see the logic behind it, tells you something real about what the Spanish empire actually needed a capital for.
A port city by design
Pizarro named it Ciudad de los Reyes — "City of Kings" — reportedly for the Catholic feast of Epiphany near the date of its founding. What mattered more than the name was the location: coastal, low-altitude, and close to the port of Callao, which meant a direct sea route to Panama and from there to Spain. Cusco was landlocked and mountainous — extraordinary for running an Andean empire on foot and llama caravan, genuinely inconvenient for an empire that needed to ship silver across an ocean. Lima wasn't built to administer the Andes the way Cusco had been. It was built to move wealth out of them.
The wealthiest city you've never pictured as wealthy
In 1542, Lima became the seat of the Viceroyalty of Peru, which at its height administered Spanish territory across most of South America — a jurisdiction that, on paper, dwarfed the better-known Viceroyalty of New Spain in geographic reach. Much of the silver extracted from the legendary mines of Potosí — in modern-day Bolivia, then part of the same viceroyalty — was refined, taxed, and shipped out through the Lima-Callao corridor, and for a long stretch of the colonial period Lima ranked among the wealthiest, most important administrative cities in the Spanish Americas, well ahead of what its modest population might have suggested. That wealth built the city's grand colonial core: the Plaza Mayor, the Cathedral, the Government Palace, and the convents and baroque churches whose blended Spanish-and-Andean styles the lesson on colonial architecture in Peru and the lesson comparing Lima's modern and colonial buildings both cover in more detail.
Power came with an inquisition
Lima's importance also made it one of only three cities in the Spanish Americas — alongside Mexico City and Cartagena — to host a tribunal of the Spanish Inquisition, established there in 1570 and operating for roughly two and a half centuries before being abolished in the early 1800s. It's a detail that cuts against any picture of colonial Lima as purely a glittering port city: the same administrative weight that made it wealthy also made it a center of religious and political control over the entire viceroyalty, with real consequences for those it prosecuted.
What the choice still shapes
Lima remained Peru's capital straight through independence, covered in the essay on San Martín's 1821 proclamation, and into the republic that followed — meaning the entire modern country still runs through a capital that was picked for its harbor, not its centrality to Andean Peru. That tension between coastal Lima and the highland and Amazonian regions it governs is still a live thread in how Peruvians talk about their own country's regional identity, covered more directly in the topic hub on Peru's regions.
See where this fits on the Peru history timeline.