 Because he saw this clearly, he decided to convene a congress of the northern departments of Peru to proclaim him president of the whole country and him empower him with authority to negotiate with the Chileans.This claim to the Presidency recognised by Chile, Iglesias proceeded to the small seaside resort of Ancón, a short distance from Lima, to fulfill his grim mission of statesmanship.On 23 October 1883 Igleasias signed the Treaty of Ancón on behalf of Peru thereby ending the hostilities.