Peruvian War of Independence The Peruvian War of Independence was a series of military conflicts beginning in 1811 that culminated in the proclamation of the independence of Peru by José de San Martín on July 28 , 1821 . During the previous decade Peru had been a stronghold for royalist s , who fought those in favor of independence in Upper Peru , Quito and Chile . The wars of independence took place with the background of the 1780 - 1781 uprising by indigenous leader Túpac Amaru II and the earlier removal of Upper Peru and the Río de la Plata regions from the Viceroyalty of Peru . Because of this the viceroy often had the support of the " Lima oligarchy , " who saw their elite interests threatened by popular rebellion and were opposed to the new commercial class in Buenos Aires . History . During the Peninsular War ( 1807 – 1814 ) central authority in the Spanish Empire was lost and many regions established autonomous junta s . The viceroy of Peru , José Fernando de Abascal y Sousa was instrumental in organizing armies to suppress uprisings in Upper Peru and to defend the region from armies sent by the juntas of the Río de la Plata . After success of the royalist armies , Absacal 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 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 cabildo s became elected , representative bodies . 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 ) . Junta movements . Despite the royalist tendencies of Peru , junta movements did emerge , often fomented by the approach of patriot armies from Buenos Aires . There were two short - lived uprisings in the southern city of Tacna in 1811 and 1813 . One significant movement , led by Natives in Huánuco , began on February 22 , 1812 . It involved various leaders , including " curaca s " and township magistrates ( " alcaldes pedáneos " ) , but was suppressed within a few weeks . More enduring was the rebellion of Cuzco from 1814 to 1815 . The rebellion began in a confrontation between the Constitutional Cabildo and the Audiencia of Cuzco over the administration of the city . Cabildo officials and their allies were arrested by the Audiencia . Criollo leaders appealed to retired brigadier Mateo Pumacahua , who was curaca of Chinchero , and decades earlier had been instrumental in suppressing the rebellion of Túpac Amaru II . Pumacahua joined the Criollo leaders in forming a junta on August 3 in Cuzco , which demanded the complete implementation of the liberal reforms of the Spanish Constitution of 1812 . After some victories in southern Peru and Upper Peru , the rebellion was quashed by mid - 1815 . Founding of the Peruvian Republic . José de San Martín and the Liberation Army of the South . After the quashing of the after mentioned rebellion , Viceroy of Peru organised two expeditions ; conformed by the royalist regiments of Lima and Arequipa , and expeditionary elements from Europe ; against the Chilean Patriots . In 1814 , the first expedition was successful in reconquering Chile after winning the Battle of Rancagua . In 1817 following the royalist defeat in the Battle of Chacabuco , the second expedition against the Chilean Patriots was sent in 1818 in an attempt to restore the monarchy . Initially successful in the Second Battle of Cancha Rayada , the expedition was finally defeated by José de San Martín in the Battle of Maipú . To begin the liberation of Peru , Argentina and Chile signed a treaty the 5 February 1819 to prepare for the invasion . General José de San Martín believed that the liberation of Argentina would not be secure until the royalist stronghold in Peru was defeated . Peruvian Campaign . Following the Battle of Maipú and the subsequent liberation of Chile , the patriots began the preparations for an amphibious assault force to liberate Peru . Originally the cost were to be assumed by both Chile and Argentina , however Chile government under Bernardo O ' Higgins ended up assuming most of costs of the campaign . Nonetheless , it was determined that the land army was to be commanded by José de San Martín , whilst the navy was to be commanded by admiral Thomas Alexander Cochrane . The 21st of August 1820 , an amphibious landing took place in the city of Valparaiso by the Peruvian Liberation Expedition under Chilean flag . Said expedition was compromised by 4 , 118 soldiers . In the 7th of September the Liberation expedition arrives to the bay of Pisco in today ' s Region of Ica and captures the province by the following day . In an attempt to negotiate , the viceroy of Peru sends a letter to José de San Martín the 15th of September . However , negotiations broke down in the 14th of October with no clear result . Beginning of Hostilities . The 9th of October 1820 marks the date of the uprising of the reserve regiment of Grenadiers of Cusco , which culminates in the proclamation of the Independence of Guayaquil . In October 21 , General José de San Martín creates the flag of Republic of Peru . Actual hostilities begin with the 1st Campaign of Arenales in the Peruvian highlands led by patriot General Juan Antonio Álvarez de Arenales between the 4th of October year 1820 , until the 8th of January year 1821 , when he reunites with General San Martín in Huaura . During this campaign , General Arenales proclaimed the independence of the city of Huamanga ( Ayacucho ) in Novermber 1st 1820 . This was followed by the Battle of Cerro de Pasco , were he defeated a royalist division sent by viceroy Pezuela . The rest of the liberation forces under Admiral Cochrane capture the royalist frigate Esmeralda the 9th of November 1820 , dealing the royalist navy a heavy blow . Moreover , in December 2 of 1820 the royalist battalion Batallón Voltígeros de la Guardia defects to the patriot ’ s side . During the 8th of January 1821 , the armed column of General Álvarez de Arenales reunites with the rest of the expedition in the coast . Viceroy Pezuela is ousted and replaced by General José de la Serna in January 29 of 1821 . In March 1821 , and incursion led by Miller and Cochrane attack the royalist ports of Arica and Tacna . The new viceroy announces his departure from Lima in June 5 , 1821 , but orders a garrison to resist the patriots in the Real Felipe Fortress , leading to the First Siege of Callao . The royalist army under the command of General José de Canterac leaves Lima , and proceeds to the highlands the 25th of June 1821 . General Arenales is sent by General San Martín to observe the royalist retreat . Two days after , the Liberation Expedition enter Lima . Under fear of repression and pillaging , the inhabitants of Lima plea to General San Martín to enter Lima . Declaration of Independence of Peru . Once inside Lima , General San Martín invites all of the population of the city to swear oath to the Independence cause . The signing of the Act of Independence of Peru is held in July 15 of 1821 . Manuel Pérez de Tudela , later Minister of International Relations wrote the act of Independence . Admiral Cochrane is welcomed in Lima two days later . Later , General José de San Martín announces in the Plaza Mayor of Lima the famous declaration of independence : San Martín Abandons Peru . José de la Serna , moves his headquarters to Qosgo , and attempts to help the beleaguered royalist forces in Callao . He sends troops under the command of General Canterac which arrive in Lima the 10th of September 1821 . He is successful in reuniting with the besieged forces of General José de La Mar , in the Fortress of Real Felipe . After learning the viceroy new orders , he leaves to the highlands again in September 16 of the same year . The republicans pursued the retreating royalists until reaching Jauja in October 1 of 1821 . Antonio José de Sucre , in Guayaquil requests help from San Martín . He complies and leads the Auxiliary Expedition of Santa Cruz to Quito . Afterwards , during the Entrevista de Guayaquil , both liberators attempted to decide the political fate of Peru . San Martín opted for a Constitutional Monarchy , whilst Simon Bolivar ( Head of the Northern Expedition ) opted for a Republican . Nonetheless , they both followed the notion that it was to be independent of Spain . Following the interview , General San Martin abandons Peru the 22 of September 1822 and leaves whole command of the Independence movement to Simon Bolivar . After a row with General San Martin , Admiral Cochrane leaves Peru in May 10 , 1882 , being replaced by Martin Guisse as head of the navy . In April 1822 , a royalist incursion defeats a Republican Army in the Battle of Ica . Afterwards , in October 1822 the republicans under General Rudecindo Alvarado experience another costly defeat at the hands of the royalist . Simón Bolívar , the Northern Expedition , and the end of colonial era . Following the declaration of Independence , the Peruvian state was bogged down by the royalist resistance , and instability of the republic itself . Hence , whilst the coast and Northern Peru was under the command of the republic , the rest of the country was under the control of the royalists . Viceroy La Serna had established his capital in the city of Cuzco . Another campaign under General Santa Cruz against the royalist is defeated . The end of the war would only come with the military intervention of Gran Colombia . Following the self exile of San Martin , and the constant military defeats under president José de la Riva Agüero , the congress decided to send a plea in 1823 for the help of Simón Bolívar . Bolivar arrived in Lima the 10th of December 1823 with the aims of liberating all of Peru . In 1824 , an uprising in the royalist camp in Alto Peru ( Modern Bolivia ) , would pave the way for the battles of Junin and Ayacucho . The Peruvian Army triumphed in the battle of Junin under the personal orders of Simon Bolivar , and in the battle of Ayacucho under command of General Antonio José de Sucre . The end of the battle led to the end colonialism in Latin America . Yet the war would not end until the last royalist holdouts surrendered the Real Felipe Fortress in 1826 . Aftermath . After the war of independence , conflicts of interests that faced different sectors of the Criollo society and the particular ambitions of individual caudillo s , made the organization of the country excessively difficult . Only three civilians : Manuel Pardo , Nicolás de Piérola and Francisco García Calderón would accede to the presidency in the first seventy - five years of independent life . In 1837 , the Peru - Bolivian Confederation was created but , it was dissolved two years later due to a combined military intervention of Peruvian patriots and the Chilean military .