Driven by the Latin American revolution, the people of Santiago, the capital of Chile, staged a massive uprising in May 1810. On September 18 of the same year, Chile's first national government was established, forcing the Spanish rulers to surrender power. On July 4, 1811, the Chilean people convened the first national assembly, passed the constitution, and announced the abolition of slavery.
However, these revolutionary achievements were not consolidated and were soon taken away by the Spanish. On February 12, 1817, the Andean army under the leadership of General San Martin, one of the liberators of South America and O’Higgins, the leader of the Chilean revolution, overcame many difficulties and crossed the Andes in the town of Chacabuco, Chile Defeated the Spanish army and captured the Chilean warlord Ponte. The army entered San Diego on February 14. The Chilean people asked San Martin to be the leader of Chile, but he declined, so O'Higgins, the leader of Chile's revolution and one of the important generals of the Andean army, was appointed the highest chief of Chile.
On February 12, 1818, O'Higgins announced that Chile was formally independent from Spain and established a republic. On April 5th of the same year, Saint Martin's army completely defeated the Spanish army in Chile in Meng Pu, and the Spanish colonial rule in Chile came to an end.