Bolivia's Constitutional Court has ruled that President Evo Morales can run for a third term in elections scheduled for December 2014.
Under Bolivia's constitution, presidents are only allowed to serve two consecutive terms.
But the court argued that Mr Morales's first term should not count because it predated the current constitution, which was amended in 2009.
Critics said the ruling showed that the court was controlled by the government.
Evo Morales, Bolivia's first indigenous president, came to power in elections in 2005. His first term in office would have run from 2006 to 2011.
But in 2009 he cut the term short, calling for a referendum on a new constitution and early elections.
Voters approved the new constitution and re-elected him by a landslide.
The 2009 constitution limits presidents and vice-president to two consecutive terms in office, which would would have prevented Mr Morales from running again in 2014.
But Constitutional Court President Ruddy Flores said Mr Morales's first term should not be counted under the rule because it had not taken place under the new constitution.
Opposition politicians were critical of the ruling allowing him to run again. Former president Carlos Mesa called the decision "unacceptable".
Samuel Doria Medina of the opposition National Unity Party said President Morales should have put the issue to a referendum instead of leaving the decision to the Constitutional Court.
"He's afraid of the people," Mr Doria added.
Were Mr Morales to be re-elected in 2014, he would become Bolivia's longest-serving president.
While he enjoyed strong support at the time of his re-election in 2009, Mr Morales has since faced a number of strikes and protests, including by police and army personnel asking for higher pay and by indigenous groups rejecting the building of a major motorway.
But opinion polls published last weekend suggest Mr Morales still enjoys strong support, with 41% of people saying they would vote for him over 17% for Mr Medina if the elections were held then.