The ruling means President Hage Geingob will continue in his second term. He won in November with 56% of the vote while Namibia's first independent presidential candidate, Panduleni Itula, received 29% in the country's tightest presidential race since independence in 1990.
Chief Justice Peter Shivute did rule that the use of electronic voting machines without a paper trail, as decided on before the 2014 election in the southern African nation, was invalid. Future elections must now include a verifiable paper trail.
Namibia was the first country in sub-Saharan Africa to use electronic voting machines.
“I think the Itula camp's failure to present clear evidence of systematic irregularities in the election was fatal to its case, so while they won key constitutional issues around the use of EVMs they didn't succeed in having the election overturned,” political analyst Graham Hopwood told The Associated Press.
He said the fact that the court ordered two-thirds of Itula's costs to be covered by the respondents was a sign that they won many of the legal arguments but not the ultimate one.