The ruling means President Hage Geingob, who won in November with 56 percent of the vote, will continue into his second term.
The Supreme Court in Namibia upheld the results of last year's presidential election on Wednesday, saying the challengers failed to prove ruling party manipulation of electronic voting machines.
The ruling means President Hage Geingob will continue in his second term. He won in November with 56 percent of the vote while Namibia's first independent presidential candidate, Panduleni Itula, received 29 percent in the country's tightest presidential race since independence in 1990.
Itula and four opposition party leaders had urged the court to declare the election results invalid and order a fresh vote.
They argued that the use of the machines without a paper trail effectively meant a key means of checks and balances was missing.
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,” said political analyst Graham Hopwood.
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.