Rwanda's Supreme Court ruled on Thursday that President Paul Kagame could run for a third seven-year term, rejecting an attempt by the main opposition party to block changes to the country's constitution.
In the latest instance of an African leader seeking to extend his days in power, the Kagame-controlled parliament backed a motion in July to let him run again as leader of the east African state.
The constitutional changes must pass a referendum although there is little chance of them failing due to Kagame's control over the media and many aspects of public life, as well as his popularity as a nation-builder after a 1994 genocide.
"All depends on the opinions of the people," the Supreme Court said in its ruling.
The opposition Democratic Green Party, which brought the case before the Supreme Court, said it would continue to push for protection of existing constitutional term limits, a hot topic in Africa after similar moves by regional leaders.
"We are not happy but we've not given up. We are going to appeal to the president," Green party leader Frank Habineza told Reuters after the decision.
Kagame has not said explicitly that he wants to run again but has made clear he is open to persuasion.
The Kigali court ruling is likely to attract attention in other African nations where term limits are under similar pressure.
Congo Republic is holding a referendum this month on constitutional changes that would allow 71-year-old President Denis Sassou Nguesso to extend his decades-long rule.
In neighbouring Democratic Republic of Congo, opposition parties have accused President Joseph Kabila, who has been in charge for 14 years, of plotting to extend his time in office via violence and manipulation of a packed electoral calendar.
In Burundi, President Pierre Nkurunziza sparked months of protests and a failed coup in April when he decided to run for a third term after a controversial court ruling that the first of his two terms did not count because he was not directly elected.
Former rebel leader Kagame won international and domestic praise for rebuilding Rwanda after the genocide, in which 800,000 people, most of them Tutsis and moderate Hutus, were massacred.
But international donors have criticised his suppression of dissent and any move to change the constitution. Washington said this month it "opposed those in positions of power changing constitutions solely for their political self-interest".