Final results from Wednesday’s seismic South Africa elections have confirmed that the African National Congress (ANC) party has lost its majority for the first time in 30 years of full democracy, firing the starting gun on unprecedented coalition talks.

The ANC, which led the fight to free South Africa from apartheid, won just 159 seats in the 400-member national assembly on a vote share of just over 40%. High unemployment, power cuts, violent crime and crumbling infrastructure have contributed to a haemorrhaging of support for the former liberation movement.

The pro-business Democratic Alliance (DA) won 87 seats, uMkhonto weSizwe (MK) – a new party led by President Cyril Ramaphosa’s bitter rival, the former president Jacob Zuma – took 58, and the Economic Freedom Fighters (EFF), a Marxist-Leninist party led by the ousted ANC youth leader Julius Malema, took 39.

Chart showing vote share by party

The ANC also lost its majority in three provinces: Northern Cape; Gauteng, which is home to the commercial centre Johannesburg and the capital, Pretoria; and KwaZulu-Natal, where MK was the largest party.

“What this election has made plain is that the people of South Africa expect their leaders to work together to meet their needs,” Ramaphosa told an audience of politicians, diplomats and civil society leaders after the official results announcement, as thunder rumbled outside.

“They expect the parties for which they have voted to find common ground, to overcome their differences, to act and work together for the good of everyone.”

Ramaphosa also joked, to laughter from the crowd, that he wished it was true when the electoral commission chairman accidentally said that he was announcing the 2029 election results.

The president faces questions about his future, though, as the ANC turns to the task of coalition building. Meanwhile, a spokesperson for Zuma’s MK party said they had boycotted the election results event.

Zuma had warned before the results announcement that it should not go ahead, saying “people would be provoked”, raising the spectre of the deadly riots that broke out when he was sent to prison in 2021.

The position of Ramaphosa was not on the table during the coalition talks that will now take place, the general secretary of the ANC said before the final results were announced.

ANC secretary-general Fikile Mbalula told a press conference at the election results centre: “If you come to us with a demand that Ramaphosa must step down as the president, that is not going to happen … It’s a no-go area. You come to us with that demand, forget it.”

MK leaders have said they will not work with the ANC while it is led by Ramaphosa, who Zuma is hell-bent on exacting revenge against. Zuma was president from 2009 to 2018 and was forced to resign by the ANC amid corruption allegations, which he denies.

Jacob Zuma said the final results announcement should not go ahead as ‘people would be provoked’. Photograph: Alet Pretorius/Reuters

“Political parties have approached us and we will be talking to … everybody,” Mbalula said. “Talks about talks are in full swing.

“We’ve got many reservations about that party, but we will talk to them,” he said of the MK. “But no political party will dictate terms like that to us as the ANC.”

The ANC is in its weakest position since it swept to power under Nelson Mandela in 1994. Nonetheless, it has options beyond Zuma’s MK.

Chart showing ANC’s declining vote share since 2004

A tie-up with the DA could be favoured by the more business-friendly wing of the ANC. However, such a coalition would face criticisms from the many black South Africans who see the white-led DA as favouring the interests of white people, which the DA denies. Some analysts have said that bringing in a third, black-led party could help the ANC head off those criticisms.

DA leaders have said a coalition is an option, as well as a “confidence and supply” arrangement with an ANC minority government and staying in opposition.

Another option for the ANC, and one that is likely to be preferred by the left wing of the party, is to link up with the EFF.

A coalition with Julius Malema’s Economic Freedom Fighters is likely to be preferred by the left wing of the ANC. Photograph: Phill Magakoe/AFP/Getty Images

That option would need another partner to clear the 50% needed, however. Often mentioned is the Inkatha Freedom party (IFP), which took 17 seats, and, like the MK, gets most of its support from Zulu people.

The MK had demanded a recount, making unsubstantiated allegations of vote rigging.

“Nobody must declare tomorrow. If that happens, people will be provoked, we know what we are talking about,” Zuma, 82, told reporters at the results centre on Saturday. “Don’t start trouble when there is no trouble.”

The words of Zuma, who was the ANC’s intelligence chief during apartheid, had raised fears of violence. More than 300 people were killed in riots in July 2021 riots after Zuma was sent to jail for contempt of court.

The constitution stipulates that parliament must sit within 14 days of the final election results and elect a president at that first sitting.