Peru was heavily indebted, and political in-fighting was again on the rise. Peru embarked on a railroad-building program that helped but also bankrupted the country. 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 5 April 1879. Almost five years of war ended with the loss of the department of Tarapacá and the provinces of Tacna and Arica,
Peru misunderstandings due to the lack of a common language. The Spanish Crown gave the name legal status with the 1529 "Capitulación de Toledo", which designated the newly encountered Inca Empire as the province of Peru. Under Spanish rule, the country adopted the denomination Viceroyalty of Peru, which became Republic of Peru after independence. The earliest evidences of human presence in Peruvian territory have been dated to approximately 9,000 BC. Andean societies were based on agriculture, using techniques such as irrigation and terracing; camelid husbandry and fishing were also important. Organization relied on reciprocity and redistribution because these societies had no