President Jacob Zuma came to power in South Africa as a populist, a traditional Zulu man with a common touch and a mighty singing voice that could lift a crowd.
As the ruling African National Congress meets this weekend to choose the 75-year-old president's successor as party leader, Zuma has become its biggest liability, his eight years in the presidency tarnished by near-constant corruption scandals and court cases against him.
Zuma, whose second five-year term as the nation's president runs until 2019, is expected to step down as ANC head at the leadership conference that starts Saturday. The event is held every five years.
His unpopularity stands to hurt by association his favored candidate, ex-wife Nkosazana Dlamini-Zuma, and help her main rival, Deputy President Cyril Ramaphosa. Many party members and observers consider the contest for party leadership a toss-up, with the winner almost certainly in line to become the next president because of the ANC's large majority in Parliament.
The president is backing Dlamini-Zuma, 68, a former Cabinet minister and chairwoman of the African Union Commission, to succeed him as head of the ANC and the party's next presidential candidate.
Ramaphosa, 65, is a former union leader who was Nelson Mandela's preferred choice to succeed him as ANC leader and South African president. Instead, the party opted for Thabo Mbeki, leaving Ramaphosa to go into a variety of businesses and make his fortune. He returned to active politics five years ago at the ANC's last leadership conference.
Ramaphosa has positioned himself as a pragmatic, business-friendly candidate who would root out the corruption that has taken hold under Zuma.
Dlamini-Zuma, meanwhile, remains close to her ex-husband, who is facing the potential reinstatement of 783 counts of corruption and fraud against him. As president, she would be in a position to protect him from those charges.
"It will be incredibly difficult to dislodge Zuma and his hold on power," said Ralph Mathekga, a Johannesburg-based political analyst. "The incumbents within the ANC have behaved and carried themselves in a way that shows they are entrenched in power."
A report released last year by Thuli Madonsela, South Africa's former public protector — an ombudsman-like figure — detailed allegations that close friends of the president and his son, Duduzane Zuma, had sought to influence Cabinet appointments to land lucrative government contracts.
Madonsela had called for a judicial commission of inquiry into the allegations, known as "state capture," but Zuma fought her recommendations in court.
On Wednesday, Zuma lost two cases, both related to his attempts to halt Madonsela's investigation. The judges issued scathing decisions and ordered the president to personally pay costs.
In another court decision, on Dec. 8, a panel of judges ordered the appointment of a new state prosecutor — and took away Zuma's power to do so, citing a conflict of interest since the president is facing graft charges. Ramaphosa, his deputy and political rival, is now tasked with the decision. Zuma has filed an appeal.
"The president had no justifiable basis to simply ignore the impact of this corruption on the South African public," one of the court decisions said. "His conduct also falls far short of the expectation on him as head of state to support institutions of democracy."
The outcome of this weekend's conference will have deep implications for the party, and for South Africa, which has seen unemployment rise and the economy slow to a crawl during Zuma's presidency.
More than 5,000 delegates from ANC branches around the country are meeting for the internal election.
There are disputes over delegate numbers and rampant allegations of vote-buying, making the outcome of the race tough to call. Court challenges over ANC leadership in several provinces are further complicating the process.
"It's going to be incredibly close," said Susan Booysen, a politics professor at Johannesburg's University of the Witwatersrand and the author of several books about the ANC. "In a situation where winner takes it all, it could be very, very volatile."
For the ANC, a bigger concern would the potential for losing its majority in the 2019 election should Dlamini-Zuma become the next leader. Analysts say a split in the party is likely if she wins.
While the party has been dominant in South African politics since the first post-apartheid election, its support has waned. In the 2016 municipal election, the ANC fell short of a majority in several big cities, including Johannesburg and Pretoria, and lost power to opposition coalitions.
"Even the ANC's own internal research shows that the ANC under a Zuma or Zuma-ist candidate cannot win the next election — that the party would slip below 50%," Booysen said. "That is what is at stake."