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 independence of Peru by José de San Martín on July 28, 1821. During the Peninsular War (1807–1814) central authority in the Spanish Empire was lost and many regions established autonomous juntas. The viceroy of Peru, José Fernando de Abascal y Sousa was instrumental in organizing armies to suppress uprisings in Upper Peru and defending the region from armies sent by the juntas of the Río de la Plata. After success of the royalist armies, Abascal annexed Upper Peru to the viceroyalty, which benefited the Lima merchants as trade from the silver-rich region was now directed to the Pacific. Because of