In 1879, Peru entered the War of the Pacific, which lasted until 1884. Bolivia invoked its alliance with Peru against Chile. The Peruvian government tried to mediate the dispute by sending a diplomatic team to negotiate with the Chilean government, but the committee concluded that war was inevitable. Chile declared war on April 5, 1879. Almost five years of war ended with the loss of Tarapacá Province, and the provinces in the Atacama region of Tacna and Arica. Originally, Chile committed to a referendum for the cities of Arica and Tacna to be held years later to self-determine their national affiliation. However, Chile refused to apply the Treaty, and both countries could not determine the statutory framework. The USA decided that the plebiscite was impossible to take; direct negotiations between the parties led to the treaty Treaty of Lima in 1929, where Peru ceded Arica to Chile and Tacna remained in Peru. Tacna officially returned to Peru on August 29, 1929. The territorial loss, extensive looting of Peruvian cities by Chilean troops, and other effects of the war led to tense diplomatic relations between the two countries, which have not since fully subsided.