MIDRAND, South Africa (Reuters) - First results from South Africa's most competitive election since the end of apartheid were trickling in early on Thursday, after a late voting surge kept many polling stations open with snaking queues late into the night.

Wednesday's vote could mark a watershed in the country's politics, as opinion polls suggest the African National Congress (ANC) could lose its majority for the first time in 30 years, meaning it has to agree to a deal with one or more smaller parties to govern the country.

The ANC has won national elections held every five years since South Africa's historic 1994 vote when Nelson Mandela was its leader, but its support has declined because of disillusionment over issues like high unemployment and crime, frequent power blackouts and corruption.

Voters are electing provincial assemblies in each of the country's nine provinces, and a new national parliament which will then choose the next president.

This time around, the ANC is still on course to get the most votes, meaning its leader President Cyril Ramaphosa is likely to remain in office.

As of 0500 GMT on Thursday, the election commission had processed results from less than 1% of more than 23,000 polling stations.

Based on that early tally, the ANC's vote share was about 54%, with the biggest opposition party the Democratic Alliance sat second on around 20% and the radical leftist Economic Freedom Fighters was on 8%. Former president Jacob Zuma's new uMkhonto we Sizwe party was fourth on roughly 5%.

Analysts say they can start making useful predictions once results from 5% of polling stations have been released.

The chief electoral officer told reporters at a results centre in the town of Midrand north of Johannesburg on Wednesday that voter turnout was likely higher than in 2019, when 66% of registered voters cast ballots.

Over 27 million people were registered to vote in this year's election.

By law the election commission has seven days to release full provisional results, but elections officials have said they are planning for a Sunday announcement.

(Additional reporting by Alexander Winning and Kopano Gumbi; Editing by Michael Perry)

By Nellie Peyton and Bate Felix