There have been jubilant scenes in Chile after an overwhelming majority voted in support of rewriting Chile's constitution, which dates to the military rule of Gen Augusto Pinochet.
With almost all the ballots counted, 78% had voted "yes" in a referendum that was called after mass protests against inequality.
President Sebastián Piñera praised the peaceful vote.
He said it was "the beginning of a path that we must all walk together".
How did we get here?
Right-wing President Piñera agreed in November 2019 to hold the referendum after a month of huge and almost daily protests across Chile which saw more than a million people take to the streets in the capital, Santiago.
The protests, which had originally been triggered by a fare hike on the Santiago metro, drew a wide variety of Chileans who shared an anger about the high levels of inequality in Chile onto the streets.
One of their key demands was to reform the old dictatorship-era constitution, which they argued entrenched inequalities by putting the private sector in control of health, education, housing and pensions.
The referendum, which was originally due to be held in April, was postponed to October due to the coronavirus pandemic.
What did Chileans vote on?
The referendum asked Chileans two questions: firstly, if they wanted a new constitution, and secondly, what kind of body they would want to draw it up.
Election officials said almost 7.5m Chileans turned out to cast their vote.
With almost all the votes counted, more than 78% voted in favour of a new constitution.
An overwhelming majority of 79% also voted in favour of the new constitution being drawn up by a body which will be 100% elected by a popular vote rather than one which would have been made up by 50% of members of Congress.
What has the reaction been?
President Piñera acknowledged that the current constitution had been "divisive" and urged Chileans to "work together so that the new constitution is the great framework of unity, stability and the future".
He also praised the democratic nature of the vote: "Today citizens and democracy have triumphed, today unity has prevailed over division and peace over violence. And this is a triumph for all Chileans who love democracy, unity and peace, without a doubt."
Celebration but hard work has just begun
As the results came in, the word REBIRTH was projected onto a building in downtown Santiago.
For so many Chileans, this is exactly what this vote represents: goodbye to a dictatorship-era constitution, and hello to a new beginning that people feel is more fitting for a modern democracy.
Sunday's vote caps a turbulent year for Chile - and this vote is the result of months of mass protests, calling for meaningful change.
But in a way, the hard work has only just begun, because it kickstarts a whole new process whereby Chileans now have to choose who will draft the constitution and what it will say.
This evening's jubilation is uplifting but the demands are many and the expectations are high.
Those who had campaigned in favour of the "yes" vote took to the streets en masse to celebrate.
One of those celebrating, Juan Pablo Naranjo, told Reuters news agency that he was grateful to the youth who had started the protest: "If it were not for the brave young people who fought for us, no one would have gone out on to the streets. I had wanted this to happen for a long time and it happened and thanks to them, today we have won."
Another said that "we are giving birth to a new constitution and we are leaving behind the constitution of Pinochet and his entourage."
Senator Juan Antonio Coloma, who led the campaign for the "no" vote, admitted defeat, saying that the referendum had "clearly taken a different turn from what we'd hoped".
What happens next?
Voters will return to the ballot boxes on 11 April 2021 to choose the 155 people who will make up the convention which will draw up the new constitution.
The convention will have nine months, with the option of a one-time extension of three months, to come up with a new text.
The new constitution will then be put to the Chilean people in another referendum in 2022.
What do Chileans want from their new constitution?
Poverty levels have dropped dramatically in Chile over the last 20 years; it is now the richest country in South America on a per capita basis. But it remains one of the world's most unequal nations and many Chileans want to see the country's wealth distributed more equally.
Fernanda Namur told the BBC that she wanted the new constitution to "represent our lower class and give them a fighting chance in this seemingly rigged game through decent education and accessible medical care".
Meanwhile, Mario Bustos Mansilla told the BBC: "I want there to be a written record of our basic rights, which for me are education, healthcare, housing."
Mr Bustos' demands were echoed by Pamela Charad who said that she wanted "better healthcare and education for everyone".
"The country is like a pressure cooker that's exploded," Ms Charad said of the months of protests in 2019 and early 2020 in which more than 30 people died.
"This is our chance to make things right."
Is this likely to change anything?
The overwhelming "yes" vote is a clear victory for those who joined the anti-inequality protests last year even in the face of police repression.
While many constitutional experts say that this is only the first step towards change, it is not the first time that Chileans have achieved change through means of a referendum. In October 1988, Chileans voted "no" to Gen Pinochet extending his military rule for another eight years.
Christian Democrat Patricio Aylwin won the presidential election in 1989 and Gen Pinochet stepped down as president in 1990.