Bolivian voters have rejected changing the constitution so President Evo Morales can run for a fourth term.
About 51.5% voted against the move with almost all the votes counted, the electoral authority said.
Evo Morales, Bolivia’s first president of indigenous origin, has said he will respect the referendum result.
The constitutional change would have allowed Evo Morales to run for re-election in 2019 and potentially remain in power until 2025.
Observers said the count has been slow but that there was no evidence of fraud.
Pollsters had suggested a victory for the “No” camp based on unofficial quick counts, prompting celebrations by “No” campaigners in various Bolivian cities.
However, many, especially in the main cities, think Evo Morales should not be allowed to serve 19 consecutive years as president, analysts say.
Opposition leader Samuel Doria Medina urged Evo Morales to “recognize the results” and focus on solving Bolivia’s problems in his remaining time in office instead of trying to run for another term.
An indigenous Aymara and former coca leaf producer, Evo Morales took office in January 2006, and his current term ends in 2020.
Observers say there is no clear successor to him and that the opposition lacks a single leader.
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.