The Battle of Huamachuco was fought on July 10, 1883, and it was the last major battle of the War of the Pacific. The Chilean soldiers led by Colonel Alejandro Gorostiaga decisively defeated the Peruvian army commanded by General Andrés Avelino Cáceres near the town of Huamachuco. This Chilean victory effectively eliminated Cáceres' Ejército de la Breña, ending any real threat or resistance in the Peruvian Andes. The Peruvian defeat paved the way for the Treaty of Ancon that finally put an end to the war. Also, one of Peru's greatest heroes, Colonel Leoncio Prado, died as a consequence of this battle.
The defeats suffered by the Chilean Army at Marcavalle, Pucará and Concepcion, in addition to the decimation of their troops due to poor sanitation, convinced the Chilean High Command of the need to completely abandon the Central Andes. This retreat was made possible by the Chilean victory at Tarma Tambo on July 15, 1882. By that time, the occupation troops had been reduced to about half their original size. Peruvian General Andrés Cáceres controlled the Mantaro valley and had even briefly possessed the city of Huancayo. He established his command in Tarma and busied himself reorganizing his army. By January 1883, Cáceres had raised his troops to 3,200 well-armed and equipped men, and commanded central Peru.
Huamachuco is a town in northern Peru and capital of the province Sánchez Carrión in La Libertad Region. The city is the seat of the Territorial Prelature of Huamachuco. Lake Sausacocha lies to the northeast.
About 30 miles away, within the Huamachuco district, is the significant archeological site of Marcahuamachuco. It is a complex of monuments, a prehistoric political and religious center of a culture that thrived 350 CE-1100 CE.
During the Andean formative and Developmental period, small settlements grew up throughout the highlands of the Huamachuco area. The Huari people built dwellings that were simple oval-shaped single rooms made of field stones, with floors of clay. These structures were used in the agricultural communities mainly for storage of crops and other goods, and sleeping.
The hamlets at higher elevations (3900–4000 m.) were bases for their herding of domesticated animals, as agriculture could not survive at those heights. The settlements in the lower elevations (2500–3000 m.) contained large amounts of agricultural tools, showing the importance of crops.