The Chilean Independence process
Napoleon’s invasion of Spain and the arrest of Fernando VII in 1808 were two of the fundamental factors in Chileans’ desire for independence. On 18 September 1810 the First National Government Junta was proclaimed and the process of autonomy and liberation from Spanish dominion was underway.
The first National Congress was elected, a Constitutional Regulation was drafted, Chile’s first newspaper La Aurora de Chile was published, and a national flag and coat of arms were created. 18 September is the national day and that is when the independence celebrations are held.
The patriots fight the royalists
The patriots’ initiative was rejected by sectors with ties to the Spanish crown opposed to the idea of independence. Both groups confronted each other militarily beginning in 1814 and the royalists, loyal to Spain, regained control of the country.
From exile in Argentina, Bernardo O’Higgins organized the liberating army and, together with José de San Martín, Governor of Mendoza, he crossed the mountains in 1817 and began the historic phase known as the Patria Nueva (New Homeland). After several confrontations with the royalist forces, the patriots were victorious and declared independence in February 1818. Bernardo O’Higgins was chosen Supreme Director of the nation.
Source: https://www.thisischile.cl/history/independence/?lang=en