Nomadic hunter-gatherers wandered here as early as 10,000 BC, but only in 800 BC did Mapuche settlers begin to permanently populate the area. Not long after the Inka made the area a major hub on their road network, Spanish soldier Pedro de Valdivia arrived and founded the city of Santiago de la Nueva Extremadura on February 12, 1541, marching on to attack the Mapuche to the south. The Mapuche living nearby weren't happy and kicked off a counterinsurgency. Valdivia's lover, Inés de Suárez, turned out to be as bloodthirsty as he was, and led the defense of the city, personally decapitating at least one Mapuche chief. Despite ongoing attacks, floods and earthquakes, the conquistadores didn't budge, and eventually Santiago began to grow.

Santiago was the backdrop for Chile's declaration of independence from Spain in 1810 and the final battle that overthrew the colonial powers in 1818. As the population grew, public-works projects transformed the city, which became the hub of Chile's growing rail network before displacing Valparaíso as Chile's financial capital in the early 20th century. Not everyone prospered, however. Impoverished farmers flocked to the city and the upper classes migrated to the eastern suburbs. Rapid post-WWII industrialization created urban jobs, but never enough to satisfy demand, resulting in scores of squatter settlements known as callampas ('mushrooms,' so-called because they sprang up virtually overnight).

Santiago was at the center of the 1973 coup that deposed Salvador Allende. During the dark years that followed, thousands of political prisoners were executed, and torture centers and clandestine prisons were scattered throughout Santiago. Despite this, military commander-in-chief General Augusto Pinochet was Chile's president until 1990. The nation's democratic government was restored in 1990 when Patricio Aylwin was elected president, with Pinochet continuing on as head of the nation's military.

The gap between rich and poor widened during the 1990s, and social inequality – though less pronounced than in other Latin American cities – looks set to linger for some time. In the decade up to 2014 there were an estimated 200 small-scale bombings in the capital. Many attributed the bombings – most of which took place at night and targeted banks and government buildings using basic pipe-bomb technology – to anarchist groups. Only one person was killed in the bombings – a would-be bomber in 2009. Occasional student and worker strikes continue to ripple through the city; however, most indicators still point to Santiago as one of the safest large cities in Latin America. Steady economic prosperity has sparked something of a renaissance, with brand-new parks and museums popping up around town, a cleaned-up riverfront, construction of supermodern apartment buildings, and large-scale projects like new metro lines and the Costanera Center, the tallest skyscraper in South America. The city also became more diverse than ever before in the late 2010s as immigrants from Colombia, Venezuela, Haiti and the Dominican Republic outpaced Peruvians and Bolivians in search of 'the Chilean dream.'