Kenya's High Court said Friday it lacked the jurisdiction to rule whether presidential hopeful Uhuru Kenyatta, who faces a crimes against humanity trial, is eligible to run for office next month.
With little time left before the March 4 election, the ruling effectively clears the way for Kenyatta to contest the polls, in which he is seen as one of the leading candidates for the country's top job.
"The High Court lacks jurisdiction to deal with a question relating to the election of a president," the panel of five judges said in a statement read to a packed courtroom, saying only the Supreme Court could rule on the case.
Kenya is less than three weeks from a presidential election, the first since polls five years ago erupted into bloody ethnic violence that left more than 1,100 people dead and hundreds of thousand displaced.
The ruling also applies to Kenyatta's running mate William Ruto.
Both men face trial at the International Criminal Court (ICC) for alleged roles in orchestrating murder, rape and violence after the 2007 polls.
Activists had sought a ruling as to whether the pair should be allowed to stand for office, as under a new constitution introduced in 2010, leaders must rule with "integrity".
"This is an issue that is within the exclusive jurisdiction of the Supreme Court," the judges' ruling said, although it was not immediately clear if any application would be made to move the case to the higher court.
Judges said that since Kenya's election commission had already passed Kenyatta and Ruto as fit to stand for election, any ruling "would end up usurping" the powers of the commission.
The politically volatile case has been repeatedly delayed, and an earlier petition was unexpectedly withdrawn in December.
However, new applications were made, including by the Kenya Human Rights Commission, the Kenyan branch of the International Commission for Jurists, and the International Centre for Policy and Conflict.
They argued that the any person committed to trial at The Hague-based ICC would not be able to properly carry out their duties of running the country, while the honour and integrity of the public office would also be damaged.
Kenyatta, the deputy prime minister and son of Kenya's founding president, faces five charges of crimes against humanity, including murder, rape, persecution, deportation and other inhumane acts.
Ruto faces three charges of crimes against humanity.
Both have proclaimed their innocence, remain free and have promised to cooperate with the court.