Zimbabwean President Robert Mugabe speaks at an election rally in Chitungwiza, about 35 km (22 miles) south of the capital Harare July 16, 2013. Zimbabwe will hold presidential and parliamentary elections on July 31. (PHILIMON BULAWAYO/REUTERS)

Zimbabweans will vote Wednesday in presidential and parliamentary elections that could extend the tenure of Robert Mugabe — one of the longest-ruling autocratic leaders in modern history — to a potential 38 years.

But even before the first ballot is cast, tensions are rising over allegations of fraud that could undermine the legitimacy of the vote and the likelihood of a peaceful outcome.

Mugabe, 89, in office since Zimbabwe gained its independence from Britain in 1980, is seeking another five-year term as president. Critics and analysts say that his loyalists have manipulated the voting process in myriad ways to try to ensure victory. There are reports of “ghost voters” and hundreds of thousands of deceased people on registration lists. Voters have complained about being improperly registered or not registered at all. And human rights activists allege intimidation and interference by the government, its military and security forces in the lead-up to the elections.

Underscoring the heightened tensions, Mugabe’s main opponent, Prime Minister Morgan Tsvangirai, who is challenging Mugabe for a third time, accused election officials last week of throwing away votes in his favor by about 70,000 police officers and soldiers who cast ballots early.

Over the weekend Tsvangirai, 61, also declared that he had no confidence in the Zimbabwe Electoral Commission’s ability to conduct a legitimate vote. He warned that if official results were delayed — as they were in the disputed 2008 elections — he would break the law and announce the election outcome.

Wednesday’s balloting comes as the southern African nation is emerging from a crippling economic crisis. At one point, inflation had soared to more than 500 billion percent in 2008 and economic output had sunk by 45 percent between 1999 and 2008, according to the International Monetary Fund and the World Bank. Today, even as growth has slowed in the past two years and poverty remains widespread, Zimbabweans are in far better economic shape.

But many analysts fear a recurrence of economic and political instability if the election results are again disputed — as well as a fresh eruption of the violence that marred the 2008 polls.

“A return to protracted political crisis, and possibly extensive violence, is likely, as Zimbabwe holds inadequately prepared presidential, parliamentary and local elections,” said a report by the International Crisis Group. “Conditions for a free and fair vote do not exist. Confidence in the process and institutions is low.”

Zimbabwe was once a major corn exporter that helped feed the region, but its economy plunged into recession following seizures of white-owned commercial farms in 2000 on the orders of Mugabe and his Zimbabwe African National Union-Patriotic Front party, or ZANU-PF. Agricultural output declined, and the nation was debilitated by shortages of food and fuel, despite having some of the world’s largest deposits of diamonds, gold, coal and platinum.

After the 2008 vote, the electoral commission took five weeks to announce the results. Those tallies showed that Tsvangirai and his Movement for Democratic Change, or MDC, had won but not secured enough votes to avoid a runoff. The MDC accused Mugabe and ZANU-PF of vote-rigging, but that did not prevent a second round of voting. Tsvangirai later pulled out of the race, declaring that Mugabe’s loyalists had killed more than 200 of his supporters.

To defuse the crisis, the Southern African Development Community, a regional bloc, brokered a 2009 power-sharing deal between the two rivals, leaving Mugabe as president and Tsvangirai as prime minister. The MDC took control of many of the government’s economic portfolios, while ZANU-PF retained control over the security ministries.

Analysts and investors widely credit Tendai Biti, an MDC stalwart who is now the finance minister, with resuscitating the economy. He abolished the Zimbabwe dollar and allowed the use of the American dollar and other strong currencies, which helped slash inflation to single digits. Since 2009, the economy has grown every year.

But the coalition government had always been a shaky partnership, and now the gloves are off. On Monday, Biti, who is also the MDC’s secretary general, publicly complained that the electoral commission had given only ZANU-PF access to the voter registrations lists.

“With virtually a day to go to the election, no political party in Zimbabwe, other than ZANU-PF perhaps, has got a copy of the voters’ roll,” Biti told reporters at a news conference in Harare, the capital.

Election officials at the news conference declined to address the allegations.

Meanwhile, at his final campaign rally Sunday, Mugabe warned Tsvangirai that he would be arrested if he followed through on his intention to announce electoral results if the electoral commission was slow to release them.

“He knows that is not allowed by law,” Mugabe told supporters. The commission “is the only organization that can announce election results. I can tell you in advance that if you become a lawbreaker, the police will arrest you.”

The allegations of vote tampering have been unfolding for several weeks. Earlier this month, the Research and Advocacy Unit, a Harare-based nongovernmental group, found that the voters’ roll contains 1 million people who are either dead or have left the country, and 116,000 people over the age of 100, among other irregularities. The government tried to ban publication of the group’s report.

One Web site, MyZimVote.com, says it has received several hundred complaints of voter intimidation, fraud, incorrect registrations and other irregularities ahead of the vote. And last month, Human Rights Watch released a report alleging that the Zimbabwean military and security forces have been beating and intimidating Mugabe’s opponents.

“With the security forces right up to the top leaders threatening and attacking Mugabe’s perceived opponents, Zimbabweans have little faith in the upcoming elections,” said Tiseke Kasambala, Africa advocacy director for the New York-based watchdog. “Zimbabwe’s unity government is going to have to rein in the security forces and keep them out of politics if the elections are going to have any meaning.”