Bolivia's constitutional court Tuesday authorized leftist President Evo Morales to run for a fourth term in 2019, despite the South American nation rejecting the move in a referendum last year.

Critics said the decision amounts to a green light for 58-year-old Morales to run for office indefinitely.

"This is clear proof the court system in Bolivia reflects Morales' will," said Carlos Cordero, a political scientist at the Mayor de San Andres University.

"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," Macario Lahor Cortez, head of the Plurinational Constitutional Court, wrote in the ruling.

In the decision, the court cited the American Convention on Human Rights, a multilateral treaty signed by many countries in the Americas.

The secretary general of the Organization of American States, which is responsible for enforcing the treaty, said the clause cited in the decision "does not mean the right to perpetual power."

"Besides, presidential re-election was rejected by popular will in a referendum in 2016," Luis Almagro wrote on Twitter late on Tuesday.

"I doubt very much that the convention validates this decision," former President Jorge Quiroga said.

The ruling is final and cannot be appealed.

In February 2016, the country voted by a slim margin against proposed changes to the constitution to allow Morales -- already Bolivia's longest-serving leader since independence from Spain in 1825 -- to again stand for the presidency. He has made clear his desire to be in office when the country celebrates its 200th anniversary of independence.

But his Movement to Socialism (MAS) party, a grouping of unions and social movements, had sought "alternative legal solutions" to overturn the popular vote.

In its ruling on Tuesday, the court said the right to run for office superseded the limits imposed in the constitution.

The court ruling was "a coup d'etat against democracy," opposition leader Samuel Doria Medina said.

"With this ruling, they have now gone outside the legal framework," Medina, a conservative legislator, added.

"This ruling should worry us, because the Constitutional Court does not respect the political constitution of the state," said Guido Mitma, executive secretary of the country's chief trade union federation, the Bolivian Workers' Centre.

It's "a sad day for democracy," said former Vice President Victor Hugo Cardenas.

The 58-year-old was first elected president in 2005. The constitution was then rewritten in 2009, stating that a president could only be re-elected once.

Morales was re-elected that same year, but when it came to 2014 polls, argued that his first term did not count as it had been served under the previous constitution, and he was duly re-elected.

In a bid to remain in power, he then proposed a constitutional amendment which would have allowed him to run for another term in 2019, but it was rejected by voters in a referendum in February 2016.

A group of legislators from the ruling Movement for Socialism then took the case to the Constitutional Court. Tuesday's ruling also extends the re-election rights of state governors, senators, parliamentarians and mayors.

Due to Latin America's history of violent dictatorships, many of the region's constitutions limit re-election in order to reduce the possibility of patronage systems developing and to prevent presidents exercising too strong an influence on the judiciary.

Morales argues he needs more time to consolidate his left-wing social reforms, however, the opposition has accused the former coca farmer of increasingly authoritarian tendencies and attempting to form a personality cult.

The Bolivian court ruling came just two days after Honduras' incumbent President Juan Orlando Hernandez had sought a second term in elections, despite the Central American country's constitution setting a one-term limit.

Morales, 58, said last year that the "no" camp won the referendum because of "lies" told by a former girlfriend about their supposed love child -- a child she eventually admitted had died shortly after birth.

"On February 21, 2016 lies won out," he said, accusing the woman of having been instrumentalized by his opponents. She was later jailed for ten years for corruption.

He later reversed course and said that while he would happily give up office, his supporters were pushing for him to stay. But his efforts to extend term limits have set off protests across the country, with opponents arguing Morales was trying to tighten his grip on power in the vein of Venezuelan President Nicolas Maduro, a leftist ally.

The landlocked Andean country has enjoyed relative prosperity and calm under Morales, the country's first indigenous president. He presided over an unprecedented economic boom for Bolivia as prices for raw materials skyrocketed just as he began his first term. He built airports and highways and put a Chinese-built satellite into space. Millions were lifted out of poverty thanks to booming natural gas revenues.

But the boom has diminished and so has Morales' popularity amid allegations of corruption and manipulation of the justice system.

An October poll by the company IPSOS said that 68 percent of Bolivians surveyed opposed his re-election in 2019.