The governing African National Congress (ANC) is expected to be returned to office in South Africa's parliamentary election, but with a reduced majority.
With more than 80% of district results declared, the ANC has won 57% of the ballot, well ahead of the opposition Democratic Alliance (DA) on 22%.
The ANC, which has been in power since 1994, won 62% of the vote at the last general election in 2014.
Anger over the economy and corruption may have eroded its appeal.
The radical Economic Freedom Fighters (EFF), is in third place with 10%, the official results. indicate.
Analysts predict the ANC will win the election with between 55% and 59% of the vote.
Turnout was about 65% in the twin parliamentary and provincial elections - a drop compared to the 73% registered five years ago.
Some six million young people did not register to vote.
Full results are due on Saturday.
South Africa's political landscape has shifted only slightly with these elections, the governing ANC slipping from 62% to 57% nationally.
That's still quite an achievement for a party that has presided over a decade of economic stagnation and entrenched corruption.
President Cyril Ramaphosa can now claim a mandate to trim a bloated cabinet, see off his rivals, and watch a revived justice system bring an end to a culture of impunity.
But fixing South Africa's stagnant economy may prove more complicated.
Although some foreign investors will be persuaded to return by the business-savvy president, the ANC, under pressure from populists, is still sending mixed messages about its reform plans.
One clear warning signal from this election is voter apathy - from the young in particular. More than half of all eligible voters took no part in South Africa's young and hard-won democracy.
Casting his vote in the country's sixth democratic national election since apartheid ended 25 years ago, President Ramaphosa acknowledged the "rampant corruption" of recent years.
President Cyril Ramaphosa arrives to cast his vote at a primary school in Soweto
"We have made mistakes but we have been sorry about those mistakes and we are saying our people should reinvest their confidence in us," he said.
"Corruption got into the way, patronage got into the way and not focusing on the needs of our people got in the way."
Young people queuing to vote spoke of their difficulties in finding jobs, with unemployment at 27%.
One young voter said her future employment prospects were on her mind. "I don't feel confident about getting the job I want," she said.
"I'm a member of the ANC, but I didn't vote for them this time," construction worker Thabo Makhene told Reuters news agency. "They need to catch a wake-up. The way they run the state, mishandling state funds, they've lost their morals."
However, many voters stayed loyal to the ANC, which led the fight against apartheid.
Esau Zwane, 90, waiting to vote in Soweto, Johannesburg, lived under white-minority rule. He told the BBC he was celebrating "that our country is now ruled by black people".
Votes are cast for parties, with seats in the 400-member National Assembly allocated according to the share of the vote gained by each party.
These MPs then elect a president.
Apartheid, in place from 1948 to 1994, legalised racial discrimination in favour of white people, and land ownership has remained a contentious issue.
Mmusi Maimane's Democratic Alliance is hoping to increase his party's vote
The white minority still owns disproportionately more land than the black majority. The EFF has led the charge in trying to change this.
Andrew Harding says the party's stance has forced the ANC to consider drastic measures to transfer more land, more quickly, into black hands, which has resulted in a pledge to conduct land expropriation without compensation.
However, the DA says it does not believe land reform needs to be "carried out in a way that takes from one to give to another", and instead promises to prioritise land reform in the budget and to release unused government land.
Other election issues include discontent over poor basic services such as water, housing and electricity, and anger over violent crime.
As well as the continued inequalities, it is thought that the failure to tackle corruption has damaged the ANC.
President Ramaphosa came to power last year pledging to get to grips with the issue, but some voters still associate the party with the corruption which thrived under his predecessor, Jacob Zuma.
Mr Zuma faces trial on numerous charges of corruption, but has denied any wrongdoing.
Votes are cast for party lists with seats in the 400-member National Assembly allocated according to the percentage vote of each party.
These MPs then elect a president.