• Ramaphosa is trying to arrest a slide in support for the ANC.
• As of 0330 GMT, more than 1.3 million votes had been processed out of around 26.8 million registered voters.
South African elections officials counted ballot papers early on Thursday, a day after a vote seen as the toughest test yet for the ruling African National Congress (ANC) party 25 years after it swept to power at the end of white minority rule.
The elections for a new parliament and nine provincial legislatures are the first barometer of national sentiment since President Cyril Ramaphosa replaced scandal-plagued Jacob Zuma as head of state in February 2018.
Ramaphosa is trying to arrest a slide in support for the ANC, which has won every parliamentary vote since the end of apartheid in 1994 but whose image has been tarnished by corruption scandals and a weak economy in the past decade.
Opinion polls suggest the ANC will again win a majority of the parliament's 400 seats, but analysts say its margin of victory may fall from the 62 per cent of the vote it secured in the last election in 2014 because of frustration with slow progress addressing racial disparities in income and wealth.
The ANC's biggest challengers at these elections are the main opposition party, the Democratic Alliance (DA), and the leftist Economic Freedom Fighters (EFF). The DA won 22 per cent of the parliamentary vote in 2014 and the EFF six per cent.
Most polling stations closed around 1900 GMT on Wednesday.
Results from some smaller voting districts started to trickle in on Thursday morning. As of 0330 GMT, more than 1.3 million votes had been processed out of around 26.8 million registered voters.
In the parliamentary vote, the ANC was on around 53 per cent, with the DA on 28 per cent and the EFF on seven per cent, with a turnout of 64 per cent. Given that less five per cent of the potential number of votes had been processed, it was too early to make an accurate prediction about the final result.
A full tally may not be known until Saturday.
Elections officials said voting had in general progressed smoothly but that there had been isolated incidents where bad weather, unscheduled power outages or community protests had caused disruptions. The electoral commission said it was investigating two potential instances of double-voting.
"The Electoral Commission will not allow the potential misconduct of one or two individuals to taint the overall outcome of these elections," the commission said in a statement.
The ANC achieved its best parliamentary election result in 2004, under former president Thabo Mbeki, when it won 69 per cent of the vote. But its support fell under Zuma, and it lost control of big cities like the commercial capital Johannesburg in local government elections in 2016.
The ANC currently controls eight of the country's nine provinces, with the DA in power in the Western Cape. Analysts predict the provincial races for Gauteng, where Johannesburg and the administrative capital Pretoria are located, and the Western Cape, home to Cape Town, will be close.
Ramaphosa, who became ANC leader in December 2017 after narrowly defeating a faction allied with Zuma, has promised to improve poor public services, create jobs and fight corruption.
But he has been constrained by divisions within his own party, where some Zuma supporters still retain influence and oppose his agenda.
(Reporting by Alexander Winning and Mfuneko Toyana; Editing by Peter Cooney and Michael Perry)