MIDRAND, South Africa (Reuters) -Vote tallying in this week's South African parliamentary election entered the final stages on Saturday, with the governing African National Congress (ANC) set to fall well short of a majority for the first time in 30 years of democracy.

The ANC has won every previous national election since the historic 1994 vote that ended white minority rule, but over the last decade its support has slid as South Africans have watched the economy stagnate, unemployment climb and infrastructure crumble.

With results in from over 97% of the more than 23,000 polling stations in Wednesday's vote, the ANC stood at 40.11%, a precipitous drop from the 57.50% it secured at the last national election in 2019.

The biggest opposition party, the Democratic Alliance, was at 21.72%, while uMkhonto we Sizwe (MK), a new party led by former president Jacob Zuma, had 14.83% of the vote.

MK's strong performance, especially in Zuma's home province of KwaZulu-Natal, is one of the main reasons behind the ANC's dismal showing.

The ANC will now have to strike a coalition deal or another form of agreement with one or more smaller parties to govern, an unprecedented prospect in the post-apartheid era.

Investors in Africa's most industrialised economy will hope the uncertain picture will quickly become clear.

Political parties' share of the vote will determine the number of seats they get in the National Assembly, which then elects the next president.

That could still be the ANC's leader, President Cyril Ramaphosa, as the former liberation movement will remain the biggest party. But Ramaphosa will be badly weakened and is likely to face calls to quit from opposition parties and critics in the deeply-divided ANC.

On Friday, however, a top ANC official backed him to stay on as party leader, and analysts say there is no obvious successor to replace him.

The election commission has pencilled in a results announcement for Sunday.

(Reporting by Alexander Winning and Silvia Aloisi; Editing by Mark Potter)