Spain conquered and colonized the region in the mid-16th century, replacing Inca rule, but failing to conquer the independent Mapuche who inhabited what is now south-central Chile. In 1818, after declaring independence from Spain, 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 20th century up to the 1970s Chile saw a process of democratization, rapid population growth and urbanization and increasing reliance on exports from copper mining for its economy. During 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 right-wing military dictatorship of Augusto Pinochet that left more than 3,000 people dead or missing. The regime ended in 1990 after a referendum in 1988 and was succeeded by a center-left coalition which ruled until 2010.