Lima was founded in 1535 by the spanish conquerer Francisco Pizarro and quickly became the most important capital of South America up till the 19th century. Silver from the Andean mines passed through the city on its way to Spain, and the wealth created by the export caused the growth of one of the finest cities of the continent. Lima started to expand rapidly at the beginning of the 20th century by migration from rural Peru and hit the 8 million mark recently ( including surrounding suburbian areas). This fast eexpansion caused and still causes a lot of problems, there are a few wealthy and middle class suburbs, but the majority of the people live in slums in poverty.
Downtown Lima still shows the the spanish influence of the past.