Burundi's President Pierre Nkurunziza can run for a third term, according to the country's constitutional court.
Under the constitution, presidents can only be elected to two terms in office but it was argued that his first term does not count as he was appointed by parliament.
The announcement has led to renewed protests in the capital.
The constitutional court's vice-president had earlier reportedly fled the country citing "death threats".
At least 12 people have died in what is seen as the most serious unrest since the end of a civil war in 2005.
Constitutional court vice-president Sylvere Nimpagaritse said most of his colleagues thought the third-term bid was unconstitutional, but they were under pressure to change their minds, reports AFP.
The president's spokesman Gervais Abayeho told the BBC's Focus on Africa radio programme that there were no threats or pressure put on the judges.
He said their discussions were private so there was no way that individuals could be singled out for their views.
After the ruling was announced, more than 500 protesters went on to the streets of Musaga, a southern suburb of the capital, Bujumbura, reports the BBC's Maud Jullien.
Three people were killed in protests in Musaga on Monday.
Live rounds have also been fired near the US embassy at people demonstrating against the third-term bid.
"The riot police deployed several canisters of tear gas and fired several warning rounds into the air," Reuters news agency quotes Becca Archer Kepper, the embassy's public affairs officer, as saying.
On Monday, US Secretary of State John Kerry urged Mr Nkurunziza to abandon his re-election bid.
"We are deeply concerned about President Pierre Nkurunziza's decision, which flies directly in the face of the constitution of this country," Mr Kerry told reporters during a visit to Kenya.
The announcement on 25 April that Mr Nkurunziza would run for a third term in June's elections sparked a wave of protests, as well as diplomatic criticism.
The Red Cross says that 12 people have died during the demonstrations and clashes between police and protesters have also left dozens injured.
People are also fleeing the country saying they "have experienced intimidation and threats of violence", according to the UN refugee agency, the UNHCR.
It says that more than 20,000 people have left for neighbouring countries.
The African Union had expressed concern about the threat to stability caused by the third-term dispute.
But at the end of April the AU's Peace and Security Council called on Burundians to respect the constitutional court's decision whichever way it went
Mr Nkurunziza, a former rebel leader, has been in power since 2005, when he was appointed by parliament following a peace deal that ended a 12-year civil war.
He then won the 2010 presidential election after the main opposition parties boycotted the vote over concerns that it would be rigged.