This oracle was eventually destroyed by the Spanish and replaced with a church, but the name persisted: the chronicles show "Límac" replacing "Ychma" as the common name for the area.Modern scholars speculate that the word "Lima" originated as the Spanish pronunciation of the native name Limaq.It became the capital and most important city in the Spanish Viceroyalty of Peru.
The National University of San Marcos, founded on May 12, 1551 during the Spanish colonial regime, is the oldest continuously functioning university in the Americas.
In October 2013 Lima was chosen to host the 2019 Pan American Games.
Faced with a naval blockade and the action of guerrillas on land, Viceroy José de la Serna e Hinojosa evacuated its capital in July 1821 to save the Royalist army.
After independence, Lima became the capital of the Republic of Peru but economic stagnation and political turmoil brought urban development to a halt.
This hiatus ended in the 1850s, when increased public and private revenues from guano exports led to a rapid development of the city.
The city underwent renewal and expansion from the 1890s to the 1920s.
It also hosted the December 2014 United Nations Climate Change Conference and the Miss Universe 1982 pageant.
In October 2015 Lima hosted the 2015 Annual Meetings of the World Bank Group and the International Monetary Fund.
Within the city are isolated hills that are not connected to the surrounding hill chains, such as El Agustino, San Cosme, El Pino, La Milla, Muleria and Pro hills.
The San Cristobal hill in the Rímac District, which lies directly north of the downtown area, is the local extreme of an Andean hill outgrowth.
During this period the urban layout was modified by the construction of broad avenues that crisscrossed the city and connected it with neighboring towns.