Chile–Peru relations forces as the Confederate forces began to split on opinions and the commanding skills of Manuel Bulnes Prieto proved superior to Santa Cruz, who was killed during the battle. Following this, Peru was once again unified, and Agustin Gamarra attempted to lead an invasion to Bolivia. The attack utterly failed, Gamarra was killed, and Peru and Bolivia entered into another war. Bolivia would once again invade Peru but, without Gamarra, Ramon Castilla became the most prominent military figure of Peru and troops were soon dispatched for the defensive. The success in this defense resulted in Peruvian victories that returned both
Protectorate of Peru this, Peru remained strongly royalist and participated in the political reforms implemented by the Cádiz Cortes (1810–1814), despite Abascal's resistance. Peru was represented at the first session of the Cortes by seven deputies and local cabildos (representative bodies) became elected. Therefore, Peru became the second to last redoubt of the Spanish Monarchy in South America, after Upper Peru. Peru eventually succumbed to patriot armies after the decisive continental campaigns of José de San Martín (1820–1823) and Simón Bolívar (1823–1825). Some of the early Spanish conquistadors that explored Peru made the first attempts for independence from the Spanish crown. They tried