 Although Chile declared independence in 1810 amid the Napoleonic wars that left Spain without a functioning central government for a couple of years, decisive victory over the Spanish was not achieved until 1818. 