Chilean occupation of Peru

The command of the Chilean Expeditionary Forces passed from Manuel Baquedano on to Cornelio Saavedra, then Pedro Lagos and finally to Patricio Lynch, who set down his military headquarters in the Government Palace of Peru in Lima. 
In absence of a Peruvian President who was willing to accept their peace terms, on 22 February 1881, the Chileans allowed a "convention" of Peruvian "notables" outside of Lima to elect Francisco García Calderón as President and also allowed him to raise and arm two infantry battalions (400 men each) and two small cavalry squadrons in order to give more consistency to the provisional government.
At that time, the Secretary of State of the new James A. Garfield's US administration, James G. Blaine, who saw the war as an inadmissible intervention of British capital in the US sphere of influence, outlined a new policy in June 1881 changing the previous neutrality for a deny of any territorial annexation of territories. On 26 June 1881 the USA administration recognized President Calderón.
In mid-April the Chileans started the Ambrosio Letelier Expedition to defeat the last forces of Pierola, but after many losses the expedition came back to Lima in early July, where Letelier and his officers were court martialed.
In Chile meanwhile a new administration had been elected, of Domingo Santa María and he pushed for finish the costly war. Because of Calderón's refusal to accept the Chilean peace conditions, he was placed under arrest by the Chileans. His arrest achieved the unity of the Pierola and Caceres forces under the in last moment named vice president Montero and was taken by the US administration as a direct affront.