The noodle of South America.- Independence of Chile.
Chile, like the other nations of the continent, was influenced by the ideals of the American and French Revolution, with the Napoleonic Invasion of Spain being the decisive factor in initiating Independence. Like most other viceroys and captaincies, Chile formed a junta that recognized Ferdinand VII as the only legitimate king of Spain, but with strong independence elements within it.
Even when the Junta was recognized by the majority of the population, and even when the former Governor of Chile assumed its presidency, criollos and mestizos continued to be discriminated against and unable to vote, thanks to the "noble neighbor" system that limited voting to those born in Spain. After the death of the President of the Junta, and inspired by the Miranda Revolution and the installation of the Supreme Junta in La Plata, the new president Juan Martínez de Rozas began the formation of an army, although La Plata was unable to send any aid thanks to the difficult situation in the Eastern Provinces and Paraguay.
General elections were eventually called throughout Chile, but the royalists, feeling inherently anti-monarchist, began a rebellion against the Junta, which was defeated in the Plaza de Santiago by the royalist colonel Tomás de Figueroa. A Peninsular Government was instituted and the Creoles had to go into exile to nearby coastal towns and even to La Plata, although the situation there was no better.
A counterrevolution was planned by the "exalted" [2] Creoles José Miguel Carrera, Benando O'Higgins and Diego Portales, who formed a triumvirate called "La Patria Infante" today. Deciding that they could not win by sheer manpower or resources, they began a guerrilla campaign, managing to secure indigenous support with the same method that Miranda used to secure it in Colombia: by promising to give them rights and abolish the huasipungo. This is very important as it is considered that the lower classes would have joined the royalists to preserve tradition and religion otherwise.
A guerrilla campaign developed around the Captaincy, similar to the one that would begin later in New Spain, although Santiago was relatively safe thanks to its status as a royalist stronghold in the area. Neither Santiago nor Lima decided to actively combat the revolutionaries, considering them a very minor threat compared to La Plata (which was in the middle of an invasion of Upper Peru) and Colombia (whose Glorious Campaign was having great success). Instead, mercenaries, thieves and guerrillas supplied and paid by the royalists were used, the most prominent being the Pincheira Brothers.
However, since both La Plata and Colombia were becoming major threats with the Colombian success in the Glorious Campaign and the successful invasion of Upper Peru by the Platinean Andean Army, Santiago had to put more resources and men into the ranks of the Royalist Armies of Lima. . The Pincheira brothers received no more resources or money and then stopped being truly loyal, and instead raided every town they found, whether they were patriots or not.
O'Higgins saw this as his opportunity and defeated them decisively at Valparaíso. The Brothers were executed, and their guerrilla divided, with some elements even joining the Patria Infante and its struggle. However, the most important consequence was that people who had been royalists up to that point became patriots, as the Brothers were still seen as a royalist guerrilla even after they turned rebels.
In Valparaíso, a formal Declaration of Independence was signed in mid-1813, with Carrera as head of state, Portales as chief ambassador, and O'Higgins as leader of the army. This was "La Moza Patria" and there the blue, white and red flag was flown for the first time. Deciding that unity came first, a national anthem, a coat of arms, and other symbols of national identity began to be used.
The first serious military action was towards Concepción, a resounding Patriotic Victory. However, thanks to the disorganization of La Plata and its military weakness in Upper Peru, Santiago was able to turn towards them, finally recognizing the Junta as a real threat and not just another Republiqueta.
Deciding that they could not win by quantity but by quality, O'Higgins traveled to Colombia and participated in the Heroic Campaign in order to gain much needed battle experience. He even had a meeting with Miranda, who refused to support his triumvirate because he himself needed those resources, but still expressed his approval and signed the "Friendship Pact between Colombia and Chile", beginning the historic friendship and alliance between the two nations. O'Higgins would also be named General of the Liberating Army and, thanks to Miranda's intervention, one of the American Militias traveled with him back to Chile.
Back in Chile, the situation was improving thanks to La Plata finally getting their act together, but Carrera feared a realistic counterattack. His fears were confirmed when the Platinean Civil War began between the Federal League and the Centralist of San Martín, which turned the battle in Upper Peru into another Guerrilla War, between the barely resisting gauchos and Peru.
However, under O'Higgins' command, the Patriots achieved victory after victory, including their first naval victory near Santiago, a victory considered the foundation of the Chilean Naval Tradition. Furthermore, thanks to the Republiquetas and the Colombian offensives, the Peruvian presence in the area was increasingly weaker. When news of the Colombian march to Lima reached Chile, the Triumvirate prepared for a final battle against Santiago, predicting that once Lima fell, royalist efforts throughout South America would collapse.
On its way to meet Miranda in Guayaquil, the San Martín would stop in Valparaíso, an area completely controlled by the patriots at that point. Although members of the Triumvirate also expressed interest in attending the conference, they ultimately decided not to.
__________________
[1]La Plata sent help in OTL, but they can't ITTL.
[2]The independentist Creoles were called that in Chile.
[3] They actually made that IOTL...
[4] As far as I know, they remained loyal to the end. I couldn't find good sources, so I invented his greed and false loyalty.
[5]Currently "La Patria Vieja", and an old design for the flag of Chile. By the way, "La Patria Infante" is something like "The Child Homeland" and "La Moza Patria" is "The Lad Homeland"... Well, it's supposed to be an analogy with the birth and growth of a nation.