Police officers secure the area outside the Constitutional Court in Harare. Picture: Tsvangirayi Mukwazhi/AP

Harare, Zimbabwe - Zimbabwe's constitutional court was set to rule Friday afternoon on the main opposition's challenge to the results of last month's historic presidential election.

Security was tight in the capital, Harare, as the court will determine whether President Emmerson Mnangagwa's narrow victory is valid. The opposition claims vote-rigging and seeks either a fresh election or a declaration that its candidate, 40-year-old Nelson Chamisa, won.

If the court upholds Mnangagwa's win the inauguration would take place within 48 hours. The ruling cannot be appealed.

A credible vote is key to lifting international sanctions as the southern African nation tries to move away from the long shadow of Robert Mugabe's 37-year rule.

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 the government of the 75-year-old Mnangagwa, a former Mugabe enforcer, was stuck in the past despite declarations of reforms.

The Zimbabwe Electoral Commission declared 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 Chamisa received 44.3 percent.

In the court hearing this week, 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.

"It's like a kid was playing with the figures," a lawyer for the opposition, Thabani Mpofu, told the court. He said Chamisa could have lost more than 69,000 votes in all, well over the 31,000 that allowed Mnangagwa to avoid a runoff election.

Chief Justice Luke Malaba, however, pressed the opposition for the original election results forms to back up their allegations: "We cannot act on generalities."

The lawyer for Mnangagwa, Lewis Uriri, agreed: "The mere making of bold allegations does not make and cannot threaten an election."

According to Veritas, a legal think tank, the court can declare a winner or invalidate the election and call for a fresh vote or make any other order it considers "just and appropriate."

AP