A military man until the end, Pedro Lagos also had a valuable participation in the Lima Campaign, where he fought at the battles of San Juan and Miraflores. In March 1881, he was named Commander in Chief of the Occupation Army, to replace General Baquedano, who returned to Chile. His short stint as head of the Chilean forces in Peru was highly controversial, due to his strict disciplinary measures against the citizens of Lima. On 18 June 1881, the Chilean Senate promoted him to Brigadier General, sent him back to Chile and appointed him chief of the Service Examination Commission. Finally, he was named Commander-at-Arms of the Santiago garrison on 23 November 1881. He died on 18 January 1884, in the city of Concepción.