After Independence:
After Ayacucho, Peru's government remained in the hands of Simon Bolivar, who delegated his duties to other characters, until his dismissal in 1827, after which the caudillo struggles continue, the Peru entered a stage marked by military rule, led by the leaders of the independence, during which the young republic faced a war with the Gran Colombia (1829).
During the governments of José de La Mar, Agustín Gamarra and Jose Luis Orbegozo political debate is centered between monarchists (who preferred to establish a constitutional monarchy to secure the internal order) and Republicans, between liberals (who, like La Mar favored a presidency controlled by Congress) and conservatives (who, like Gamarra, were friends of authoritarianism), among those who thought the new republic of Bolivia was annexed to Peru (Gamarra) and those who believed in the need of uniting them. This latter view was General Andrés de Santa Cruz who became president at the union drives of the two countries.
The Peru-Bolivian Confederation was created by Santa Cruz on June 15, 1837 and dissolved on August 25, 1839 at the end of the war against the Peru-Bolivian Confederation. The dissolution of the Peru-Bolivian Confederation, states Surperuano Norperuano and again make a single republic that remains to this day.
Confederation to be dissolved, Agustin Gamarra, who participated in restorative Army-imposed as president by Congress, initiating a government of peace that ends by declaring war on Bolivia and being defeated at the Battle of Ingavi, after which time unleashed anarchy in the republic, giving ephemeral entity coups 1842 and 1843, until the ascension military also Manuel Ignacio de Vivanco, against those who rebel and Ramon Nieto Castilla Sunday, defeating the movement in the Battle of Carmen Alto and restoring Manuel Menendez to the previous elections in 1845.