The territory of Chile has been populated since at least 3000 BC. By the 16th century, Spanish conquistadors began to subdue and colonize the region of present-day Chile, and the territory became a colony between 1540 and 1820, when it gained independence from Spain. The country's economic development was successively marked by the export of first agricultural produce, then saltpeter and later copper. The wealth of raw materials led to an economic upturn, but also led to dependency, and even wars with neighboring states. Chile was governed during most of its first 150 years of independence by different forms of restricted government, where the electorate was carefully vetted and controlled by an elite.