South Africa's ruling ANC was Saturday declared winner of general elections, handing it a sixth straight term in the post-apartheid era on what was nevertheless its worst electoral showing.
The African National Congress (ANC) won a healthy majority with 57.5 percent -- or 230 out of the 400 parliamentary seats.
But that still represented 19 seats fewer than in 2014.
The official results, as declared by the electoral commission, were therefore the ANC's poorest ever showing in its long electoral run, which started in 1994, when Nelson Mandela led it to victory in the first multi-racial polls.
The party has been battling corruption scandals, sluggish economic growth, record unemployment and poverty -- issues its leader Cyril Ramaphosa, a veteran of the anti-apartheid struggle, has promised to tackle.
But its poor electoral showing could hamper efforts to revive the flagging economy and fight corruption.
Businessman Ramaphosa, 66, took over last year when the ANC forced then-president Jacob Zuma to resign after nine years dominated by graft allegations and economic decline.
The ANC's closest rival, the opposition Democratic Alliance (DA), trailed at a distant 20.7 percent or 84 seats.
The radical left Economic Freedom Fighters, founded six years ago by former ANC youth leader Julius Malema, came third with 10.79 percent. But that was four percentage points more than in 2014 and means a jump from 25 to and 44 parliamentary seats.
After the official declaration of the results in Pretoria, Ramaphosa said: "Our people have spoken - and they have done so clearly and emphatically.
"They voted for a united South Africa, they voted for a more equal society, free from hunger and want. We can declare with certainty that democracy has emerged victorious."
Despite the plunge in support, ANC chairman Gwede Mantashe said the party was grateful for a new "lifeline".
It was an improvement on its 2016 local government elections performance "when we were really facing a disaster", he said. "We are picking up from that disaster."
Minister in the presidency Nkosazana Dlamini-Zuma acknowledged the decline in support, but said: "We are happy with the mandate the people have given us and we will work hard to improve."
"The ANC are being given a chance," said political analyst Lumkile Mondi. "This is an opportunity for them to reincarnate themselves."
Analyst Susan Booysen of the Wits School of Governance said the tally was "way higher for the ANC than it would have been had Zuma been still in power".
The ANC's reputation suffered under Zuma, and Ramaphosa still faces resistance to his reform agenda, especially from Zuma allies still holding senior positions in the party and government.
Support for the party has fallen in every election since its 2004, when it got nearly 70 percent. By 2016, it had fallen to 54 percent in municipal polls in which it lost control of key city governments.
A record 48 parties contested Wednesday's elections.
A reduced majority nevertheless weakens Ramaphosa's bargaining power, making him more vulnerable to the pro-Zuma faction in the governing party, analysts warn.
South Africa's economy grew just 0.8 percent in 2018 and official unemployment hovers around 27 percent.
It remains in charge eight of the nine provinces.
Some 65 percent of the 26.8 million people registered to vote turned out Wednesday.
'Era of political realignment'
DA leader Mmusi Maimane, put a brave face on his party's failure to cash in on waning ANC support.
"Even though we've lost some votes, we've held the centre -- and I will lead that project going forward," said Maimane, the party's first black leader.
Malema's EFF made major gains, jumping from 6.3 percent in the 2014 poll. It campaigned on promises to seize land from whites without compensation to give to poor blacks, and to nationalise mines and banks.
"It's the last election that it (ANC) will win outright. We have now created the biggest decline for the ANC," said EFF chairman Dali Mpofu.
"In the next election there will not be any outright winner. We are going to enter the era of coalitions,... an era of political realignment."
The conservative and predominantly white Freedom Front Plus, founded in 1994 during the negotiations to end apartheid, performed unexpectedly well, picking up 10 seats -- six more than in 2014.