South Africans have no doubt that Jacob Zuma will be their next president, yet the nation is on edge about a man with a dizzying trail of legal woes leading a democracy that once saw itself as a moral beacon.
Fifteen years after its spectacular rebirth as the "rainbow nation" under the lionized leadership of Nelson Mandela, South Africa will on Wednesday elect a parliament that is all but certain to choose Zuma as president.
"We must take it for granted that from a moral point of view, he will be in a weak position as president. He will not be a strong moral leader like Nelson Mandela," said political analyst Dirk Kotze.
Doubts about the leader of the ruling African National Congress (ANC) have grown over the years along with his seemingly endless legal woes.
|ANC supporters cheer as South African ruling party president Jacob Zuma addresses a rally on the outskirt of Cape Town in February.|
Zuma was acquitted in a rape trial in 2006, but is still ridiculed for telling the court that he had showered to prevent HIV following unprotected sex.
Just two weeks ago prosecutors dropped corruption charges against him, saying they were confident of their case but could not go to trial after Zuma's lawyers presented wiretaps that showed political meddling in the case.
The decision only raised new questions about the integrity of the prosecuting authority and how a politician obtained wiretaps from the intelligence service.
The scandals have dimmed the ANC's reputation, with an Ipsos poll taken last month showing 47 percent of voters trust the party less now than 15 years ago.
But despite it all, analysts say South Africa's democracy is proving remarkably resilient.
"Our institutions, for justice particularly, have been put under pressure. The fact that politicians have tried to influence the courts in one way or another is hard to deny," said Adam Habib of the Human Sciences Research Council, a think-tank.
"I do however think we shouldn't overplay that, because institutions do come under pressure in many political regimes."
Elections are without question free, the opposition is allowed to campaign unhindered, and the media conduct wide-ranging investigations into top politicians, he noted.
When the ANC under Zuma's leadership sacked Thabo Mbeki as head of state last year, a new president was quickly named and all the requirements of the constitution were met, he added.
After the political tussling, disgruntled ANC members formed a new breakaway party called the Congress of the People (COPE), which is now challenging the ruling party and the opposition Democratic Alliance.
"The fact that the COPE was formed created a new option," Kotze said.
"If we look at the election in general ... and the role of parliament and the role of the political parties, I think most people are more optimistic today than a year ago," Kotze said.
Under one of the most progressive constitutions in the world, South Africa has made important gains in reducing the inequalities inherited from apartheid.
Most households now have electricity and clean water. Although more than one million families still live in shacks, government has provided 2.8 million new homes to poor families in the last 15 years.
Women regularly take top posts in government, and an HIV-positive gay man was named this year to the Constitutional Court with hardly a murmur of surprise from the public.
"Great strides have been made, and we have to be mindful of that," said Judith February of the Institute for Democracy in South Africa.
But Zuma will have to overcome the political fallout from his past troubles to tackle a staggering crime rate and reduce the still crushing levels of poverty, which hits blacks the most, she said.
"What you're seeing in South Africa the cleavages of race and class still deeply divide this country," said February. "He's got to prove to us that he's able to hold things together."