At the start of the War of the Pacific, (April 5, 1879), Cáceres was sent with his "Zepita" Battalion to the province of Tarapacá. There, he fought against the Chilean Army in the battles of San Francisco and the Tarapacá. In the latter, his intervention was decisive to achieve a Peruvian victory against heavy odds.