Leftist candidate Gabriel Boric has won Chile's presidential election after an early concession from his far-right rival, José Antonio Kast.
Mr Kast conceded defeat barely an hour and a half after polls closed, and with around half of ballots counted.
The election has been one of the most polarised in recent decades and comes after mass anti-government protests.
Both candidates offered starkly different visions for the country, and both are outsiders representing political parties that have never been in government.
At 35-years-old, Mr Boric will become one of the world's youngest political leaders, and the youngest president in Chile's history.
In a phone call with outgoing President Sebastián Piñera, which was publicly broadcasted, Mr Boric said he would do his "best to rise to this tremendous challenge".
A former student protest leader, he backed the mass demonstrations against inequality and alleged corruption that rocked Chile in 2019 and 2020.
Mr Boric has promised to address this inequality by reforming Chile's pension and healthcare systems, reducing the work week from 45 to 40 hours, and boosting green investment.
His rival, meanwhile, stood on a platform of law and order, pledging cuts to tax and social spending.
Mr Kast also defended the legacy of former military dictator General Augusto Pinochet, who took power in a coup and ruled the country from 1973 to 1990. Under his leadership more than 3,000 people were murdered by the state or disappeared, and thousands of political opponents were held in internment camps.
In a tweet, Mr Kast said he had called Mr Boric to congratulate him on his "great triumph".
"From today he is the elected President of Chile and deserves all our respect and constructive collaboration," he added.
The country is going through huge changes after voting overwhelmingly last year to re-write Chile's Pinochet-era constitution.
Mr Piñera said that Chile was living in "an environment of excessive polarization, confrontation [and] disputes," and urged his successor to "be the president of all Chileans."