Chile gained independence from Spain after the Chilean War of Independence (1810–1818). The paramount leader was Bernardo O'Higgins, revered as the Liberator of Chile.
O'Higgins, alongside other patriots, led the military and political struggle that culminated in the decisive Battle of Maipú (1818), securing Chilean sovereignty. He became the first head of state of independent Chile.