The campaign ended with the Chilean occupation of the Peruvian capital and the establishment of the Chilean authority in it and other surrounding territories, which would extend until 1883, with the end of the war.