JOHANNESBURG/LONDON - The prospect of South Africa's first coalition government of the post-apartheid era is likely to keep markets jittery for months, but the weakened ANC party could soothe some nerves by seeking a deal with the pro-business Democratic Alliance, investors say.

South Africa's currency and bonds fell as election results showed the African National Congress's (ANC) vote share tumbling to 40% with over 97% of polling stations counted - far short of a majority.

The ANC had been forecast to lose its majority with final results expected to be released on Sunday. But the scale of the losses has blown the door wide open for a myriad of political outcomes that could shape the economic and fiscal trajectory of Africa's most industrialised nation for years to come.

"We are right in the area of most uncertainty in term of what the make-up of the government is going to be," said Kieran Curtis at asset management firm abrdn in London.

"The ANC have been very, very seriously kicked."

Markets were swift to react. The rand has weakened 1.7% from pre-election levels, briefly touching a five week low on Friday.

International bonds lost as much as two cents, with some longer-dated maturities trading below or close to the 70 cents in the dollar mark below which debt is considered distressed.

And the cost of insuring exposure to South Africa's international debt spiked to levels last seen in April - as did yields on domestic bonds.

Key now will be coalition talks, with investors trying to assess the implications of the various combinations.

Potential partners for the ANC are the centre-right Democratic Alliance (DA), the far-left Economic Freedom Fighters (EFF) party, or former President Jacob Zuma's newly-formed uMkhonto weSizwe (MK) party - in second place and a surprise strong performer in the ballot.

"The DA obviously is the favourite choice for investors," said Ray Jyan, London-based portfolio manager at Europe's largest asset manager Amundi, adding an agreement on such a coalition could spark a rally in South African assets.

"The DA has proven to be very efficient in terms of execution of policies and in terms of anti-corruption as well ... They (the ANC, President Cyril) Ramaphosa have a decent plan in terms of reform, the problem is always execution."

COMBINATIONS

Other combinations will be more challenging for investors.

"The reality is if we do end up with an ANC-EFF or ANC-MK (coalition) there will be initial market jitters," said Mandisa Zavala, head of asset allocation at financial firm Alexforbes in Johannesburg, predicting this could spark an outflow from government bonds and pressure on the currency.

The stakes are high, as the new government will have to tackle long-term problems, with South Africa's economic growth averaging just 0.8% since 2012, unemployment among the highest in the world, and power cuts ever present.

But any form of coalition is likely to bring uncertainty, with investors particularly worried that the concessions involved in forging a deal could lead to a ramp up in spending.

"Our projections are for debt to continue increasing. If there is a coalition or minority government for which various preferences for spending have to be accommodated, that may result in further spending pressure," said Dennis Shen, Berlin-based senior director for sovereign and public sector at ratings agency Scope.

"The governability of South Africa may become even more difficult compared to the single-party rule. And that may present risk for the sovereign credit rating," said Shen, whose firm has a BB rating on the country with a stable outlook.

Who will fill the key position of finance minister is another key question for markets - as is the independence of the central bank and its mandate, which has been a topic of debate within the ANC in recent years.

"Any threats to the independence of the SARB (South Africa Reserve Bank) or any threats to getting to an overall balanced budget with reduced sovereign debt would also be frowned upon and would be felt firstly in the rand and then ultimately on the ground through diminished foreign investment," said Craig Pheiffer, chief investment strategist at asset manager Sasfin Wealth in Johannesburg.

(Reporting by Olivia Kumwenda-Mtambo in Johannesburg and Karin Strohecker in London; Additional reporting by Marc Jones; Editing by Mark Porrer)