A high court in Botswana's capital on Tuesday dismissed the opposition Umbrella for Democratic Change's (UDC) call to have the results of the October general election thrown out over "irregularities".
Botswana voted on October 23 and the ruling Botswana Democratic Party (BDP) won with a majority of 38 seats against the UDC's 15 seats in the 57-member parliament.
The UDC had petitioned the court and contested the outcome of the election citing "irregularities in some of the constituencies".
Delivering its ruling in Gaborone on Tuesday, Justice Mercy Garekwe said "it cannot be deduced that the people or institutions which allegedly committed the corrupt and illegal practises are election or polling agents of the 2nd respondent (BDP),"
"As for the BDP, names are mentioned but none of them are said to be election or polling agents of the 2nd respondent (BDP)."
President Mokgweetsi Masisi has denied UDC claims of irregularities.
A majority of the nine judges were of the view that the matter was not properly before the court, saying petitioners failed to provide verifying affidavits and comply with rules.
There was one dissenting judge, Justice Michael Leburu, who said it was a sad day for democracy when the courts decide to deny the nation a chance to know what really happened.
"The case is about justice not formalism. Judges who are quick to dismiss cases based on technicalities deny litigants justice and avoid difficult issues raised during the merits," Leburu said.
UDC leader Duma Boko praised the judgement delivered by Leburu.
"Even I know how painful and difficult it is to cut against the grain of conservative thought and set yourselves apart from those held hostage," Duma wrote of his Facebook page. "That's the way of justice."
It is expected that UDC will appeal the ruling.
The BDP has ruled the southern African country since independence from Britain in 1966.
But the party suffered a seismic jolt in May when former president Ian Khama renounced his hand-picked successor Masisi and backed a new party.
The October polls were predicted to offset the divided BDP's hold on power and reduce its majority in parliament.
Instead it secured a sweeping victory.