A ruling by Bolivia's Constitutional Court allowing President Evo Morales to stand for a fourth consecutive term in office in 2019 has been described as a "blow to democracy" by his opponents.
The court lifted constitutional limits on re-election arguing that they violated candidates' human rights.
The ruling comes less than two years after Bolivians voted against lifting term limits in a referendum.
The court was asked to rule on the matter by members of Mr Morales' party.
President Morales, 58, has been leading Bolivia since 2006. The ruling will allow him to stand for another term in 2019, and if he is elected, he would be in power until 2025.
Former President Jorge Quiroga said Mr Morales was ignoring the will of the people as expressed in the referendum held on 21 February 2016.
"The Constitutional Court has dealt a blow to democracy," Mr Quiroga, who is from the opposition Christian Democratic Party, said.
"Evo Morales is ignoring the constitution that he himself asked us to vote for," he said referring to the 2009 constitution which was backed by President Morales.
Changes to presidents' term limits:
- 1967 constitution: States that presidents can serve a maximum of two terms in office, but not back to back
- 2009 constitution: Lifts ban on serving consecutive terms, but presidents are still limited to two terms
- 2016 referendum (rejected by voters): Proposed dropping term limits
- 2017 constitutional court ruling: Scraps term limits
Conservative opposition leader Samuel Doria Medina published a video message calling the court's decision "a coup d'etat".
Respuesta al golpe de estado contra nuestra democracia. pic.twitter.com/dmc4YVb0bc— Samuel Doria Medina (@SDoriaMedina) November 29, 2017
"With this ruling, they have now gone outside the legal framework," Mr Doria said.
The constitutional court argued that the human rights of Bolivian politicians to be elected and those of voters to cast their ballots for whoever they choose superseded the term limits set in the constitution.
The ruling applies not only to the president but to all elected officials.
"All people that were limited by the law and the constitution are hereby able to run for office, because it is up to the Bolivian people to decide," the head of the court wrote in the ruling.
The court quoted the American Convention of Human Rights as the legal framework for its decision.
But the head of the Organization of American States, which is responsible for enforcing the convention, said the way the Bolivian court had interpreted the convention was wrong.
He wrote on Twitter [in Spanish] that the article quoted by the constitutional court "does not envision the right to perpetual power".
Many of the people who voted "no" in the 2016 referendum said that after a decade of Mr Morales in power, they wanted to see someone else lead the country.
But Mr Morales' support remains strong among his traditional backers such as indigenous groups and some trade unions.
Earlier this month, thousands of people took part in a demonstration in La Paz calling for him to be allowed to serve a fourth term.
They say that no other president has done as much to help the poor as Evo Morales has and they want him to be given more time to implement further social reforms.
They also argue that the only reason President Morales lost the 2016 referendum was because of an illegal defamatory campaign launched against him in the run-up to the vote.
Evo Morales in office
January 2006: Starts first term as president
January 2009: Bolivians approve new constitution in a referendum
December 2009: Mr Morales wins second term by a landslide in early presidential election
April 2013: Constitutional court rules Mr Morales can stand in the 2014 election despite the 2009 constitution limiting presidents to two consecutive terms. The court argues that his first term should not count because it took place before the constitution came into force
October 2014: Morales wins third term in office
February 2016: Bolivians vote in a referendum against lifting presidential term limits
November 2017: Constitutional court scraps term limits