Spain conquered and colonized the region in the mid-16th century, replacing Inca rule in the north and centre, but failing to conquer the independent Mapuche who inhabited what is now south-central Chile. After declaring its independence from Spain in 1818, Chile emerged in the 1830s as a relatively stable authoritarian republic. In the 19th century, Chile saw significant economic and territorial growth, ending Mapuche resistance in the 1880s and gaining its current northern territory in the War of the Pacific (1879–83) after defeating Peru and Bolivia. In the 1960s and 1970s, the country experienced severe left-right political polarization and turmoil. This development culminated with the 1973 Chilean coup d'état that overthrew Salvador Allende's democratically elected left-wing government and instituted a 16-year-long right-wing military dictatorship that left more than 3,000 people dead or missing. The regime, headed by Augusto Pinochet, ended in 1990 after it lost a referendum in 1988 and was succeeded by a center-left coalition which ruled through four presidencies until 2010.