President Emmerson Mnangagwa's win in last month's polls has been upheld by Zimbabwe's Constitutional Court.
The opposition MDC Alliance had brought the legal challenge saying the vote was marred by "mammoth theft and fraud", but this was rejected by the court.
Delivering the verdict, Chief Justice Luke Malaba called allegations of tampering "bold and unsubstantiated".
It was Zimbabwe's first election since long-time leader Robert Mugabe was ousted from power last year.
Two days after the vote, at least six people were killed in clashes between the army and MDC Alliance supporters, who alleged that party leader Nelson Chamisa had been robbed of victory.
Ahead of the court ruling, the streets around the courthouse in the capital, Harare, were cordoned off by security forces.
The BBC's Shignai Nyoka in Harare says that the city's roads are mostly empty.
What did the judges say?
In a unanimous judgement, the nine judges ruled against the opposition's petition because they said it did not include sufficient evidence.
"The best evidence would have been the contents of the ballot boxes themselves," Chief Justice Malaba said.
He also said that if the opposition had requested a re-count of the vote it would have provided "a clear and indisputable picture of the outcome of the election".
Chief Justice Malaba then dismissed as "startling" the MDC Alliance's claim that an official revision of the vote share was itself proof of irregularities.
President Emmerson Mnangagwa narrowly avoided a second-round run-off when he took 50.7percent of the vote. Zec, the electoral commission, had revised this figure from the 50.8percent it originally released.
Chief Justice Malaba said the body had "complied with prescribed procedures" when it announced the change.
What were the allegations?
Central to the opposition's legal challenge was their claim that the recorded number of votes had been doctored to hand President Mnangagwa victory.
In Zimbabwe's voting system, a candidate can win in the first round and avoid a second-round run-off if he or she secures more than 50percent of the vote.
The opposition alleged that Mr Mnangagwa's 50.7percent vote share - which was just 30,000 more votes than the minimum needed for outright victory - was suspicious.
It says that when the votes were counted, 40,000 more presidential ballots were found than parliamentary ones.
International election observers, who were allowed into Zimbabwe for the first time in 16 years, largely praised the conduct of the polls.
However, European Union observers were more cautious, stating that all parties should accept the verdict but also suggesting that President Mnangagwa had benefited from an "un-level playing field"
- BBC