President Evo Morales of Bolivia has narrowly lost a referendum to allow him to stand for a fourth term in office, exit polls suggest.
One poll suggests 52.3% voted against the proposal to amend the constitution, while another suggests it was 51%.
However, Mr Morales's deputy has predicted Bolivia's first head of state of indigenous origin could still win, as official results trickle in.
The constitution change would have let Mr Morales remain in power until 2025.
Opposition supporters have been celebrating the referendum result in parts of the main city, La Paz.
Mr Morales, an indigenous Aymara and former coca leaf producer, took office in January 2006.
The president's current term ends in 2020.
He is still a popular leader and the economy has grown steadily over the past decade, the BBC's Americas Editor, Leonardo Rocha, reports.
However, many thought Evo Morales should not be allowed to serve 19 consecutive years as president, our editor adds.
Opposition leader Samuel Doria Medina urged Mr Morales to "recognise the results" and focus on solving Bolivia's problems in his remaining time in office instead of trying to run for another term.
However Vice President Alvaro Garcia Linera said the results so far were a "technical tie".
He urged people to wait for the official results and said any celebrations by the opposition were premature.
"Opinion polls, especially exit polls, make mistakes," he told reporters.
"They don't take into account the vote abroad. They don't go to the more remote locations, where there is more support for our socialist movement.
"It's highly likely that the numbers shown by the opinion polls will be very different from the reality."
Vote counting has been slower than usual.
The electoral authorities say the delay is affecting mostly ballots from rural areas, which largely support the president.
In the eastern province of Santa Cruz, angry voters set fire to ballot papers and ballot boxes after a delay to the opening of several polling stations.
Even if he loses the referendum, President Morales will have plenty of time before the next election to pick a successor and otherwise influence Bolivia's future, Michael Shifter, head of the US-based Inter-American Dialogue think tank, told Reuters news agency.
"He is one of the most charismatic and powerful leaders in Bolivian history. It is unlikely he is going to just retire from politics," he said.
"But perhaps for the first time in a decade, it is possible to imagine a Bolivia without Evo that does not return to the old times of economic and racial exclusion."
Despite a drop in the international price of oil and natural gas, the Bolivian economy has performed well in the past 10 years, growing on average 5% a year.
The government's socialist policies have also been successful in reducing extreme poverty.
But recent allegations that Mr Morales used his influence to favour a Chinese construction firm in Bolivia have damaged his approval ratings.
A former girlfriend of Mr Morales, Gabriela Zapata, holds an important position in the company, CAMC, which has secured more than $500m (£350m) in contracts with the Bolivian government.
Mr Morales rejected the allegations and said he had nothing to hide. He ordered an investigation into how the contracts were awarded.