South African President Cyril Ramaphosa led the African National Congress (ANC) to victory in Wednesday's election, but a drop in its share of the vote underlines the challenge he faces restoring confidence in his party.
With opponents in the ANC and an emboldened far-left opposition party, the former union leader turned business tycoon may struggle to deliver on his promises to push through tough reforms.
Africa's oldest liberation movement won 55.5% of the parliamentary vote, according to provisional results from 99.9% of polling districts. That was its worst parliamentary result since it swept to power at the end of white minority rule but an improvement on its showing in 2016 local elections.
Ramaphosa worked closely with South Africa's first black president Nelson Mandela to end white minority rule in 1994. He replaced scandal-plagued Jacob Zuma as head of state in February 2018 after winning a bitter contest to become ANC leader and convincing top party officials to instruct Zuma to resign.
Ramaphosa's first full presidential term should start later this month, after nomination by his party's parliamentary caucus and an inauguration ceremony.
"We've made mistakes, but we are sorry about those mistakes, and we are saying our people should reinvest their confidence in us," Ramaphosa said on Wednesday after casting his ballot in the Soweto township where he grew up.
During the campaign he had crisscrossed the country, trying to convince disillusioned voters to give the ANC another chance. Many are frustrated that huge racial disparities in income and wealth persist 25 years after the end of apartheid.
During Zuma's nine years as president, support for the ANC dropped as economic growth faltered and the party's reputation was tarnished by corruption scandals.
Ramaphosa's allies say his efforts to clean up the ANC's image are starting to bear fruit.
"Ramaphosa was a game-changer for the ANC in this campaign. Voters trust that he can do things right," said ANC executive member Fikile Mbalula.
Some analysts say the election result means Ramaphosa will be able to fend off a potential leadership challenge from party enemies aligned with his predecessor.
In his first 15 months in charge, Ramaphosa has tried to tackle entrenched corruption and improve governance at struggling state-owned firms like power utility Eskom. But he has found it difficult to meaningfully lift the economic growth rate and has been forced into some uneasy compromises in key policy areas like land reform.
At a campaign event in Johannesburg, Ramaphosa promised a "step-change" in the pace of reform after the election.
But analysts and some ANC party sources are skeptical. "There will still be a significant fightback from the Zuma faction which will restrain Ramaphosa," said Darias Jonker, director for Africa at Eurasia Group, a New York-based political risk consultancy.
The scale of the challenges Ramaphosa faces are immense. Unemployment stands at around 27 percent, and nearly twice that for young people, while investment by local and international firms is weak after years of policy missteps and regulatory upheaval.
Support is growing for the far-left Economic Freedom Fighters (EFF) party, which saw the biggest gains at the election and could try to force Ramaphosa into pursuing more radical policies in the next parliament.
The first barometer of Ramaphosa's reformist credentials will be whether he trims a bloated cabinet. ANC party sources say Ramaphosa wants to merge several ministries to cut wasteful expenditure.
The 66-year-old son of a retired policeman, Ramaphosa rose to prominence as a labor activist defending the rights of black miners as leader of the National Union of Mineworkers.
A massive strike led by Ramaphosa's union in 1987 taught business that "Cyril was a force to be reckoned with," said Michael Spicer, a former executive at Anglo American. "He had a shrewd understanding of men and power and knew how to get what he wanted from a situation," Spicer said.
When Mandela was released from prison in 1990, Ramaphosa held the microphone as he delivered his first public speech after nearly three decades of incarceration.
The successful conclusion of talks to end apartheid, where Ramaphosa negotiated on behalf of the ANC, paved the way for the party to win South Africa's first democratic elections.