'''The War of the Confederation''' (1836-1839) was an armed conflict between the Republic of Chile and the Peru-Bolivian Confederation which was fought mainly for predominance in the sea. It was fought mainly in Peru.

Before the war, Peru was involved in a civil war between north and south. Marshal Andrés de Santa Cruz, President of Bolivia, lent his support to the south and, once he north was finally conquered, he established the Republics of North Peru and South Peru. To top it all, he decided to create a confederation with the three nations, with him as Supreme Protector.

Chile, instigated by [[MagnificentBastard Diego Portales]], saw the confederation as a commercial threat, and a failed expedition of former president Ramón Freire to seize power as Santa Cruz’s plan to interfere with Chile’s internal politics. But even though the war was declared, nobody in the country really cared.

And then Portales was killed by some soldiers unhappy with his military purges and political ways. The assassination was seen as another move of Santa Cruz to throw Chile into chaos, making the war acceptable to the people.

The first expedition to the Peru was an absolute fiasco and ended with the Treaty of Paucarpata, leaving things [[StatusQuoIsGod almost the same as it started]].

Back in Chile, the failure was so scandalous that the government sent a second expedition to Peru. This one was more successful and the military defeats and growing opposition in Bolivia forced Santa Cruz to flee, ending the war and the confederation. Bolivia and Peru were two states again and Peru was unified once again.

Peru and Bolivia kept in war for some time, but that's part of another story.

If you're searching for the war that involved the Confederate States of America, that would be UsefulNotes/TheAmericanCivilWar.

!!Tropes set during the war:

* ActionGirl: La Sargento Candelaria, a legend of a woman who disguised herself as a Male Soldier in the Chilean Army.
* BalkanizeMe: A minor example; after the civil war Peru was divided in two countries.
* ColonelBadass: General Manuel Bulnes, who later would be [[UsefulNotes/PresidentsOfChile President of Chile]].
* FinalBattle: During the first expedition the Chilean commander, Rear Admiral Manuel Blanco Encalada, was obsessed with having one of these. One of the main reasons for their initial failure.
* HeroicSecondWind
* MagnificentBastard: Portales, as stated above.
* TheManBehindTheMan: Diego Portales was the power behind Chilean president José Joaquín Prieto. It was he who decided to declare war for economical reasons.
* StatusQuoIsGod: Completely '''averted'''. Back in Chile, the Treaty of Paucarpata was met with indignation by both the population and the government.
* VisionaryVillain: Santa Cruz wanted to create a Bolivarian empire.
!!Depictions in fiction