South America has, since the wars of liberation (1810 - 1820), been dominated by its three largest countries (in land and population), Brazil, Argentina and Colombia. Following the death of Simon Bolivar in 1830 the three-nation alliance began to fall apart.
The 1st Argentine - Brazilian war of 1825 - 1828 came about following the Uruguayan declaration of independence from Brazil. Argentina supported Uruguay from 1826 (when it seemed that the Uruguayans would be defeated). The war dragged on for another two years but ultimately emperor Pedro sued for a peace.
In 1860 Brazil signed an agreement with the Andres de Santa Cruz, the dictator of Peru and Bolivia, to protect each others interests and protect each other in time of war. The agreement was reluctantly accepted in Bolivia but the for the Peruvians it was the final straw. A Peruvian army led by General Ramon Castilla rebelled against the confederation, declaring Peru independent once more. Brazil honoured her agreement and sent an army of 25,000 men to help Santa Cruz re-establish control over the region. But neither side could secure the decisive victory needed to win the war outright.
By January 1863 the war was still undecided. It was at this point Francisco Solano Lopez, the new Paraguayan leader complicated matters further. He declared war on Argentina and Bolivia, claiming more territory, and formed an alliance with Castilla against Bolivia and Brazil.
The war became known as the triple alliance war, due to the fact it had three sides:
Paraguay and Peru
Argentina and Uruguay
Bolivia and Brazil
The war was to drag on for a decade, and resulted in nothing. Argentina and Brazil both signed a truce following the treaty of April in April 1867, remaining in a conflict against Paraguay without signing an alliance. Following Santa Cruz's death in 1865 Bolivia and Peru signed a truce, uniting against Paraguay. In response Lopez mobilized the whole nation to the war effort, demanding all citizens pay 95% tax, mobilizing all men into the army and forming special women's battalions. His actions however only prolonged the war.
Brazil officially signed a peace with Paraguay in 1869, with Peru following suit a year later. But Argentina won a string of victories in the summer of 1871, and in 1872 they took Asuncion. Lopez retreated into the Jungle, but refused to submit, his army was now reduced almost entirely to the women's battalions. In March 1873 the remnants of the Paraguayan army, faced the Argentine 1st army in the Cerro Cora valley. Five days of battles followed, before on March 5th Lopez and the final few of his followers were butchered.
In total over one million people were killed in the war, over three-fourth of the Paraguayan population among them.