A few people know about the three unsuccessful state mergers in South and Central America--Gran Columbia, spearheaded by Simon Bolivar, the United Provinces of Central America, which was the most successful of the three, and, finally, the Peru-Bolivia(n) Confederation, a state merger that lasted a combined 3 years, from 1836-1839. This state was headed by Marshal Andrés de Santa Cruz, and by the time of its dissolution, it was headed towards a dictatorship. Its short run ended with the battle of Yungay, won by the Chileans, who were propelled into the war by fear of this new, and potentially quite a powerful state, and also by the assassination of Diego Portales, in which Santa Cruz was suspected to be involved, when in fact he was not. However, in this alternate history, the Chileans do not go to war with Peru-Bolivia--there are four reasons for this:
1. Peru-Bolivia and Marshal Santa Cruz were recognized by all major European powers, along with the United States.
2. The assassination of Portales never happens because the man responsible is killed in the Chilean War of Independence as a Private (this is the official point of divergence)
3. The general public of Chile did not support a war with Peru-Bolivia before the assassination of Portales--the 1829-1830 Civil war was still fresh in everyone's minds. In regular history, Portales became the martyr the Chilean government needed to justify a war with a much larger state.
4. Santa Cruz had just defeated a large Argentinian force at the Battle of Montenegro in 1838, which would discourage Chile from trying to invade.
The consequences of Peru-Bolivia becoming established are myriad in South America. Portales, an influential statesman in Chile, would remain a bitter opponent of the Confederation for the rest of his life--he saw it as tipping the balance of power in South America. Nevertheless, Portales was a sort of Talleyrand of Chile, an actor behind the scenes, and was greatly hated by the population during his life. There was great opposition to his pro-centralization and conservative policies. They would have never followed the govt.'s lead into a war, and any attempt to force it would have probably resulted in another Chilean civil war.
But Santa Cruz was not in the clear yet. While most of his country, the South Peruvian Republic and the Bolivian Republic, were very satisfied with the whole arrangement of the Confederation, North Peru was definitely not. While South Peru and Bolivia benefited hugely from the placement of the capital (Tacna), and the end of barriers to trade between the two countries, North Peruvian businessmen were left out to dry. In fact, they were so angry about the whole arrangement that they decided to defect from the Confederation and ask Chile for help with dissolving it. But they would find no allies. Argentina was still sulking from its wounds, and while many in Chile's government wanted to go to war, they felt that it wasn't worth the risk of some sort of rebellion. Already, a general had tried to overthrow the Prieto government (the coup attempt may or may not have had backing from Santa Cruz). The new Chilean government needed time to consolidate its recent policy gains, and a war wouldn't help that.
Of note is that Santa Cruz himself, like Chile's Portales, was an authoritarian who knew how to stabilize rowdy countries, as he had done in Bolivia from 1829 onwards. In 1838, he discovered a plot to overthrow him in North Peru, and conducted an extensive purge, jailing suspected enemies and executing others. While relations were already bad with Chile, they got worse when it was revealed that the conspirators were collaborating with the Chilean Government. During the period of 1836-1843, Santa Cruz built up a sizeable army, equipped with modern weaponry and well-trained, mostly to ward off any thought of a Chilean-Argentinian invasion.
Santa Cruz's domestic policies were much the same as his as the President of Bolivia in 1829--in 1840, he issued a new currency, the Bolivar, named after the man he had served under in the Latin American Wars of Independence and who both Peru and Bolivia owed their independence to. He continued to purge those who showed opposition to his vision. He reformed the public financial system, opting for a high tariff on Chilean imports. He also carried over the Bolivian Civil Code from his term as President of Bolivia, which itself was based on the Napoleonic Code. To encourage economic activity in the North Peru (and to increase his popularity there), he made the cities of Talara, Chicayo, and Chimbote Free Ports. This privelege was also extended to some ports in south Bolivia, notably Puerto La Mar (Cobija). He also did this to get the economic edge on the Chilean ports.
Meanwhile, powers around South America took notice of this bold new player on the board. Santa Cruz was now the most powerful man in all of western South America, controlling everything from the Western Amazon to the Gran Chaco. The three constituent republic's presidents were not really in a position of power, all being henchmen of Santa Cruz. Commerce and industry began to grow in Bolivia, but especially in South Peru. However, North Peru continued to grumble as its once ultra-wealthy elites in Lima continued to decline.
The international situation was quickly becoming disadvantageous to Chile. They had lost a good deal of time. They could have defeated the Confederation when it was in its infancy, but now, they were stuck scheming behind the scenes with the few remaining North Peruvian Rebels. In order to check the power of the Confederation, they would need to develop a network of alliances, starting with their old friends, the Argentinians. Meanwhile, Brazil was busy having internal conflicts and was a relatively new nation at the time, so it had very little influence on what was going on in Western South America.
That is how my alternate history, tentatively called "The Continuation of the Confederation," Begins. Also, I thought the original flag of the Peru-Bolivian Confederation was a bit lazy. It just combined the coat of arms of the three states in a sort of wreath. So I redesigned it. The red sky represents Northern Peru, for whom red is an important color on their flag. The Sun is a simplification of the Sol de Mayo of South Peru, while the green mountain represents the mountain seen in the old Bolivian Coat of Arms. The yellow strip represents the Atacama desert, shared by North and South Peru, and the white represents the Salar de Uyuni, one of the massive salt deserts, and a natural wonder, of Bolivia