Andrés Avelino Cáceres Dorregaray (November 10, 1836 – October 10, 1923) served as the President of Peru two times during the 19th century, from 1886 to 1890 as the 27th President of Peru, and again from 1894 to 1895 as the 30th President of Peru. 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, 1833, 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 Huanca, an Inka-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