History of Lima was decided, at the Battle of Ayacucho on December 9, 1824, Lima was considerably impoverished. After the war of independence, Lima became the capital of the Republic of Peru but economic stagnation and political turmoil brought its urban development to a halt. This hiatus ended in the 1850s, when increased public and private revenues from guano exports led to a rapid expansion of the city. In the next two decades, the State funded the construction of large size public buildings to replace colonial establishments; these included the Central Market, the General Slaughterhouse, the Mental Asylum, the Penitentiary, and the Dos
Lima under General José de San Martín landed south of Lima in 1820 but did not attack the city. 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. Fearing a popular uprising and lacking any means to impose order, the city council invited San Martín to enter Lima and signed a Declaration of Independence at his request. However, the war was not over; in the next two years the city changed hands several times. After independence, Lima became the capital