Zimbabwe's constitutional court on Friday unanimously upheld President Emmerson Mnangagwa's narrow victory in last month's historic election after the opposition alleged vote-rigging, saying "sufficient and credible evidence" had not been produced.
That means the inauguration will be held within 48 hours as Zimbabwe moves into a new era after Robert Mugabe's 37-year rule.
"One shouldn't perhaps get drunk on their own brew," a lawyer for Zimbabwe's electoral commission, Tawanda Kanengoni, told reporters after emerging from the courthouse. "In this instance, the maker of the lie ended up believing the lie."
A lawyer for the opposition and its 40-year-old candidate Nelson Chamisa, Thabani Mpofu, told reporters "it's up to you to conclude" if justice had been served. "Good fight," he added, walking away.
"As far as the legal processes are concerned this is the end of the road," said the opposition MDC's secretary-general, Douglas Mwonzora. "But we have other avenues ... we can demonstrate."
Security was tight in the capital, Harare, ahead of the court's ruling amid concerns about possible unrest.
The July 30 vote was peaceful but scenes of the military sweeping into the capital two days later to disperse opposition protesters- six people were killed- led to fears that Mr Mnangagwa's government was stuck in the past despite declarations of reforms.
The 75-year-old Mr Mnangagwa, a former enforcer for Mr Mugabe, took power after Mr Mugabe stepped down in November under military pressure.
The opposition had claimed vote-rigging and sought either a fresh election or a declaration that Chamisa won.
The court said it was up to the opposition to prove its claims and it failed to do so, saying the best evidence would have been the content of the sealed ballot boxes but that route was not pursued.
The court's ruling cannot be appealed.
A credible election is key to lifting international sanctions on the once-prosperous southern African nation after Mugabe's rule was marked by harassment of the opposition and rigged votes.
The electoral commission had declared Mr Mnangagwa won with 50.8 percent of the vote but later revised that down to 50.6, attributing the revision to an "error" but arguing it was not significant enough to invalidate the win. It said Mr Chamisa received 44.3 per cent.
In the court hearing on Wednesday, the opposition claimed the electoral commission bumped up Mnangagwa's figures through double counts and the creation of "ghost" polling stations. It also alleged that some polling stations recorded more voters than those registered.
The court on Friday said the electoral commission had "debunked to some degree" the opposition's claims.
"We are ecstatic that the court has upheld the will of the people," said Paul Mangwana, spokesman for the president. "Although this case has delayed our celebrations."