Andrés Avelino Cáceres Andrés Avelino Cáceres Dorregaray ( November 10 , 1836 – October 10 , 1923 ) was three times President of Peru during the 19th century , from 1884 to 1885 , then from 1886 to 1890 , and again from 1894 to 1895 . In Peru , he is considered a national hero for leading the resistance to Chilean occupation during the War of the Pacific ( 1879 – 1883 ) , where he fought as a General in the Peruvian Army . Early years . Andrés Avelino Cáceres was born on November 10 , 1836 , in the city of Ayacucho . His father , Don Domingo Cáceres y Ore , was a landowner and his mother , Justa Dorregaray Cueva , daughter of the Spanish colonel Demetrio Dorregaray . He was " mestizo " ; one of his maternal ancestors was Catalina Wanka , an Incaica - Wanka princess . He studied at the " Colegio San Ramón " ( ) in his hometown . Military career . In 1854 , Cáceres abandoned his studies and joined the " Ayacucho " Battalion as a cadet . As part of this unit , he participated in the rebellion led by General Ramón Castilla against President José Rufino Echenique , which ended with the victory of the former at the Battle of La Palma ( January 5 , 1855 ) . Afterwards , he quickly ascended through the military , obtaining the rank of Second Lieutenant later that year and that of Lieutenant in 1857 . Between 1857 and 1859 he actively supported Ramón Castilla ' s government against a rebellion by former president Manuel Ignacio de Vivanco . During the fighting , Cáceres was severely wounded in the left eye . War against Ecuador . When war broke out between Peru and Ecuador in 1859 , Cáceres was still ailing from his wound , but took part in the campaign . After the conflict ended in 1860 , Castilla appointed Cáceres to serve as military attaché of the Peruvian delegation to France and he traveled there . He received treatment for his eye in Paris . Cáceres returned to Peru in 1862 and joined the " Pichincha " Battalion in Huancayo . War against Spain . During this period , he became known for his outspoken opposition to President Juan Antonio Pezet , who had allowed the Spanish occupation of the Chincha Islands in the Vivanco - Pareja Treaty of 1865 . For his criticism he was exiled to Chile with several other officers but they managed to escape , landing at the southern port of Mollendo . They joined the " Revolución Restauradora del Honor Nacional " ( National Honor Restoring Revolution ) led by Mariano Ignacio Prado against Pezet ' s government . Cáceres participated in the occupation of Lima and later , with Prado as president , in the Battle of Callao on May 2 , 1866 which forced Spanish naval forces to retreat from Peruvian waters and the Chincha Islands . Pardo ' s Presidency . In 1868 , Cáceres decided to end his military career and return to Ayacucho to live as a farmer . However , he returned to the political arena in 1872 opposing colonel Tomás Gutierrez ' s coup against president Manuel Pardo . Pardo was the first civilian President of Peru and founder of the influential Civilista Party which played an important role in Peruvian political history . His support for Pardo ' s Presidency earned him support from Civilista Party leaders and he was appointed head of the " Zepita " Battalion . As such , in 1874 , he suppressed a rebellion led by future Peruvian President Nicolás de Piérola in Moquegua . For this action , he was awarded the rank of colonel and later named prefect of Cuzco . War of the Pacific ( 1879 - 1883 ) . Southern Campaign . At the start of the War of the Pacific , ( April 5 , 1879 ) , Cáceres was sent with his " Zepita " Battalion to the province of Tarapacá . There , he fought against the Chilean Army in the battles of San Francisco and Tarapacá . In the latter , his intervention was decisive to achieve a Peruvian victory against heavy odds . Despite this victory , the Peruvian Army proved incapable of stopping the invasion and was forced to retreat north to the province of Tacna . Chileans landed north of this position , at Ilo , from where they attacked the main Peruvian position . Cáceres played a major role in the reorganization of the Peruvian Southern Army . This Army was deployed around the city of Tacna together with a Bolivian Army led by the President of Bolivia himself , General Narciso Campero . However , the political instability created after Nicolás de Piérola successfully overthrew Mariano Ignacio Prado hampered the actions of the Allied Army against the Chileans . On May 26 , 1880 , the Battle of the Alto de la Alianza was fought , where the Chileans defeated the combined Bolivian - Peruvian Army . Cáceres had a notable participation in this action after which he retreated to Lima . Lima Campaign . Piérola ordered what was left of the Army to protect the capital , Lima together with poorly armed citizens which were called to the fight . Cáceres was then put at the command of the 5th division of the Reserve . With no reinforcements available , and with the Chilean assault force deploying from the south , Peruvian forces were defeated in the battles of San Juan and Miraflores . Cáceres was wounded in the latter combat and taken to Lima . When the city fell in January 1881 , he escaped to Jauja in the mountainous hinterland of Peru . La Breña Campaign . As the senior officer in the region , Cáceres was named Political - Military Chief of the departments of the center ( April 26 , 1881 ) . He dedicated himself to organizing resistance against Chilean occupation , conducting a guerrilla war for which he mobilized the peasant population . Thanks to the local support , the difficult terrain and his own military skills , Cáceres defeated several Chilean expeditions sent against him at the battles of Pucará and another battle there in July 1882 , Marcavalle , and La Concepción . For this feats , he was nicknamed as the " Brujo de los Andes " ( Wizard of the Andes ) . But in spite of all his talent and resolve , he was finally defeated by the better armed and trained Chilean forces in the Battle of Huamachuco ( July 10 , 1883 ) . Even though he tried to regroup , a Peruvian government headed by Miguel Iglesias signed the Treaty of Ancón ( October 10 , 1883 ) , recognizing defeat and bringing an end to the war . First Presidency ( 1886 - 1890 ) . After the war , Cáceres refused to recognize Iglesias as president so a civil war ensued between these two factions . He evaded the enemy ' s army and attacked Lima on November 28 , 1885 , forcing Iglesias to resign on December 12 . The country was ruled by a Council of Ministers headed by Antonio Arenas while new elections took place . Running for the Constitutional Party , Cáceres won the elections as sole candidate and assumed as president on June 3 , 1886 . The new government faced a serious economic crisis due to a huge debt and the severe damage caused by the War of the Pacific . As a solution for these problems , the Cáceres administration engaged in negotiations with its creditor s , the result of which was the Grace Contract , signed on October 28 , 1888 and approved by the Congress of Peru on October 25 , 1889 . Under the agreement , the Peruvian State handed over control of its railways , a guano concession , annual payments over 33 years and several minor concessions . In exchange , its creditors agreed to pay the country ' s debt and expand its railways . The Grace Contract caused widespread controversy , the Cáceres administration was accused of having sold the country ' s main assets at a very low price among other things . In any case , the agreement allowed the government to solve its external debt problem and assured the expansion of Peruvian railways at a time when there were no public resources whatsoever for either task . Other initiatives undertaken during this period included the end of the use of banknotes as legal tender the separation of State incomes between those of the central government and those of the departments , and a partial consolidation of the internal debt . After the victory of Remigio Morales , the official candidate in the presidential elections of April 13 , 1890 , Cáceres transferred power to his successor on August 10 of the same year . Second Presidency ( 1894 - 1895 ) . Morales Bermúdez died in office on April 1 , 1894 and was replaced by vice president Justiniano Borgoño . Subsequent presidential elections were won by Cáceres amid accusations of fraud . His second term was inaugurated on August 10 , 1894 . There were widespread outbreaks of rebellion throughout the country , which eventually united under the leadership of former president Nicolás de Piérola . Rebel forces attacked Lima on March 17 , 1895 , the ensuing fight was stopped two days later by an armistice signed under the auspices of the diplomatic corps . Recognizing his defeat and unpopularity , Cáceres resigned and was replaced by an interim Government Junta . Later years . After his downfall , Cáceres lived in Buenos Aires , Argentina from 1895 until 1899 . He returned to Perú but left again , this time for Europe where he served as Peruvian ambassador in the Kingdom of Italy ( 1905 – 1911 ) and the German Empire ( 1911 – 1914 ) . Back in Lima , he supported Augusto B . Leguía in his campaign for the presidency and his successful coup against José Pardo in 1919 . The new government awarded him the rank of Marshal on November 10 , 1919 . Cáceres died on October 10 , 1923 in the town of Ancón at the age of 90 . Legacy . In Peru , Cáceres is regarded as a nationalist figure . His image symbolizes resistance against foreign forces for his opposition to the Spanish occupation of the Chincha Islands and , more importantly , for organizing resistance against Chile , Peru ' s traditional enemy . In recent years , in acknowledgement of this symbolism , a group of Peruvian military veterans have organized and adopted the name " etnocacerista " after Cáceres . " Etnocaceristas " now compose the bulk of the support for the Peruvian Nationalist Party . An interesting legacy is found in the person of Zoila Aurora Cáceres , one of his daughters , who left behind a rich oeuvre of writing .