Battle of Miraflores The Battle of Miraflores occurred on January 15 , 1881 in the Miraflores District of Lima , Peru . It was an important battle during the War of the Pacific that was fought between Chile and the forces of Peru . The Chilean army led by Gen . Manuel Baquedano defeated the army commanded by Nicolás de Piérola guarding the second defensive line of the Peruvian capital city . Two days later , Lima , the capital city of Peru was occupied by Chilean troops . Gen . Baquedano ' s forces marched into Lima triumphant , while Peru ' s president and his officers fled into the interior , leaving the country without any government . Although the fall of Lima , the war continued between the occupation army and the troops of Andres Caceres for another three years . During the occupation of Lima , Peru ' s National Library was burned , while a number of other monuments were ransacked by Chilean forces and taken as war trophies . During the battle , Peruvian naval officer Captain Juan Fanning became a national hero for leading a spectacular infantry charge of marines that nearly outflanked the enemy . Fanning ' s brigade caused some Chilean casualties until running out of ammunition , then continued to fight with knife and bayonet until Fanning was mortally wounded . 400 of Fanning ' s 524 men were killed during the charge . Prelude . After the Chilean victory at Chorrillos , a truce was declared between both sides while peace conversations took place . The Chilean objective was to obtain an unconditional capitulation and avoid another battle before entering Lima . To that end , General Baquedano held talks with Nicolás de Piérola and mediators Spencer St John of England , Jorge Tezanos Pinto of El Salvador and M . de Vorges of France . The failure of these peace talks led to the second battle for control of Lima . Peruvian defenses . During the peace conversations , Pierola arranged his army in a second defensive line at Miraflores . The defenses of this line were arranged in a similar way to those at Chorrillos two days earlier . A 12 km . line extended from the beach at Miraflores until the Surco River , formed by 10 strongholds about 900m apart . This line was divided in three sectors : The Chilean Forces . The Army of Chile had a strength estimated about 12 . 000 men and was divided into three divisions and one reserve as it follows : The artillery consisted in the regiments " Nº1 " and " Nº2 " . The cavalry had two regiments also , the " Cazadores a Caballo " and the " Cazadores de Yungay " . First Movements . Because of a skirmish between a small groups of Chilean and Peruvian forces , in the night of January 14 , Colonel Lagos ordered his Chief of Staff Jose Eustaquio Gorostiaga to send out a small force in order to scout the terrain at the south of Barranco . This resulted in the III Division placing on the southern edge of the Surco river . On the vanguard were deployed a company of the " Santiago " 5th Line Regiment and 40 soldiers of the Acongagua Battalion and some artillery pieces , adding up 150 Chilean troops at the north of Barranco . Lagos ' division was stationed on the vanguard considering this unit didn ' t had as many losses as the other two divisions at Chorrillos . At this time , in the Peruvian lines , Gen . Pedro Silva decided to make a formal review of his troops in order to rise their morale , which was very low due to the impact of the defeat at Chorrillos two days ago . This movement in the defensive lines made the Chilean officers became suspicious and strengthened their advanced troops ( at 400 meters of the Peruvian lines at the northern side of the Surco river ) . The Naval Regiment and the entire 5th Line Regiment were disposed to the right and to the left of the railroad connecting Barranco and Miraflores . Now the Chilean vanguard counts 1 , 100 men . At 10 : 00 hrs , Martinez ' reserve was ordered to move in direction to Barranco , arriving at 11 : 00 to their destination . At 10 : 45 hrs Gorosteaga , who was concerned about the vicinity of the Peruvian forces at the other side of the river , and informs this to Col . Lagos who orders to put the entire division in line . After this , the I Division moved towards Barranco . Col . Martinez ' brigade began to move at 13 : 00 hrs , but Col . Amunategui ' s brigade didn ' t advanced until 14 : 00 hrs . Meanwhile , Gen . Baquedano ordered the cavalry to forward to Barranco . Lagos ' s division continued evolving on the first line with its 2nd Brigade on the left flank . Its 1st Brigade was not in position , because the troops were unaware of the tense situation , so Col . Lagos urged to force the march and advance quickly to their positions alongside the 1st Brigade of the Artillery Regt . Nº1 . All this movement took place in front of the Cáceres ' Division on the front western side . The battle . The beginning . At 14 : 00 hrs , the battle started unexpectedly , catching both sides unprepared . However , the Chilean right wing ( about 3 , 380 troops at that time ) were attacked by Cáceres ' Corps ( about 5 , 000 men ) . The Chilean battleships began to fire upon the Peruvian positions trying to ease the pressure . Cáceres sent the Guardia Chalaca and Guarnición de Marina battalions against Barcelo , while a fraction of Col . Suarez ' Corps engaged Urriola , who wasn ' t in complete formation yet . The strength of the Peruvian attack forced the Chileans to retreat . At this time , Lynch ' s I Division wasn ' t yet in position , so the cavalry regiments and the artillery pieces withdrew from the front line . The Chilean Counterattack . By 15 : 00 hrs , the first troops of the I Division arrived at their positions on the right flank of Lagos ' units . Two reserve battalions had been sent to reinforce Lagos as well , along with two cavalry regiments . Caceres sent the Concepción , Libertad and Paucarpata battalions to strengthen the attack against the Chilean troops , but were stopped and began to refold again . Col . Lagos ordered the " Santiago " 5th Line Regt . to assail Caceres ' forces in a pincer maneuver , and the rest of the brigade were to set upon the Peruvians with a frontal charge . While the " Santiago " performed the flanking attack , three companies of the other units assaulted the trenches , which had to be reinforced with another five . The Chileans succeeded in their attempt and took Redoubt Nº1 , breaking the Peruvian line , and Caceres retreated to Redoubt Nº2 . Breakthrough . With the entire I Division now reunited and Col . Barbosa ' s brigade reinforcing the left flank , the Peruvian offensive weakened . Barcelo ' s brigade , now under Lt . Col . Demofilo Fuenzalida ( since Colonel Barcelo had been wounded ) , and backed up by soldiers of the 3rd Line Regiment , outflanked the position and onsetted the next four Peruvian redoubts in the I Sector ( gunned with thirty cannons and ten machine guns ) from behind and expelled its defenders , then advanced to Miraflores . Although the Peruvian resistance on the right was fading , on the center the situation was quite different . Here the defenders held their positions a while longer , but began to cede when another two Chilean regiments arrived . When these redoubts were taken , the 8th Battalion in redoubt Nº 5 withdrew , collapsing the entire Peruvian front . By 18 : 30 , Fuenzalida arrived at Miraflores train station , while the cavalry regiments converged on his position . With the battle already decided , Echeñique ordered the remaining troops not to enter in combat , dissolving his forces and sending them home , avoiding the combat to reach the capital ' s streets . Nevertheless , the positions at San Bartolomé and San Cristóbal continued firing at the Chilean troops a while longer . Like Chorrillos , Miraflores was burned to the ground . By midnight , Rufino Torrico , Mayor of Lima surrendered the city to Gen . Baquedano . Finally , Lima had fallen after more than five hours of fierce combats and almost two years of war . Aftermath . Military and political consequences . The casualties in both sides were enormous . The Chilean army lost between 2 , 200 and 2 , 600 men , among them Juan Martínez , Commandant of the Atacama Infantry Regiment . Lagos ' III Division fought in the front line the entire battle , so had the biggest losses , 1 , 131 men were dead on wounded . The I Division lost 697 men , and the II Division 347 soldiers . The Chilean reserve suffered the loss of 346 men . The Peruvian army had losses estimated in about 3 , 200 men ( 30 . 4 % of their total force ) , but it ' s not been confirmed with official reports . After this victory , Lima surrendered and the Chilean army entered in the " City of the Viceroys " on January 17 , 1881 . Also , Nicolás de Piérola left the city in direction to the Andes , as many of his officers did . Among these officers was Col . Andres Caceres , who led the resistance in the mountains against the Chilean occupation army . Another four years of war were necessary until the decisive Chilean victory at Huamachuco , on 1883 . Bibliography . < div class = " references - small " >