Beginning in 1867, he served as Captain of the Port in several locations and explored the Marañón and Huallaga rivers on board the gunboat Napo, conquering the treacherous Pongo de Manseriche. In 1872, he was one of the officers on board the frigate Apurímac, when the naval commanders signed a manifesto declaring their opposition to the coup led by Tomás Gutiérrez. During a term as Sub-director of the Naval College, he served on a commission to measure the depth of guano deposits along the coast (1875-1876).
