Peru lost a large chunk of her territory and natural-resources patrimony to foreign-flag workers. Mining companies brought in hordes of Chilean miners who, when a dispute arose, hoisted the Chilean flag in revolt, Chile came to their assistance, and the war was on.
Chile won the war, and Peru lost the Tacna District and what were to become some huge metal mines of the northern Atacama Desert. The loss was permanent, and irretrievable.
They should have imported Koreans or Japanese!