South African President Cyril Ramaphosa was sworn in on Wednesday for a second term in which his African National Congress will share power with other parties after it lost its majority for the first time in 30 years of democracy.
A former liberation movement, the ANC came to power under Nelson Mandela's leadership in the 1994 elections that marked the end of apartheid and had long been unbeatable, but it lost its shine after presiding over years of decline.
Following a parliamentary election on May 29 in which no party won a majority, Ramaphosa will head a government of national unity with five other parties, including the ANC's largest rival, the pro-business Democratic Alliance.
While investors have welcomed the inclusion of the DA, which wants to boost growth through structural reforms and prudent fiscal policies, analysts say sharp ideological divisions between the parties could make the government unstable.
Just before the election, Ramaphosa signed into law a National Health Insurance bill that the DA says could collapse a creaking health system. It was unclear what would happen to that law under the new government.
The DA advocates scrapping the ANC's flagship Black economic empowerment programme, saying it hasn't worked -- a highly contentious topic in a nation grappling with huge inequalities, some inherited from apartheid.
African heads of state and dignitaries from as far afield as Cuba, a historical friend of the ANC, gathered outside the Union Buildings in Pretoria, seat of the South African government, to bear witness to Ramaphosa's inauguration.
A ceremony full of military pomp and pageantry began, with inter-faith prayers by Christian, Hindu, Muslim, Jewish and traditional African religious leaders, reflecting the diversity of South African society.
Military helicopters flew past in blazing sunshine, trailing South African flags, to cheers from the audience.
Ramaphosa has yet to announce the make-up of his new government, to be negotiated with members of the new alliance.
"The president does not want the country to go through a prolonged period of uncertainty," and consultations will continue even late on Wednesday, his spokesman Vincent Magwenya told state broadcaster SABC.
The ANC remains the largest party after the May 29 election, with 159 seats out of 400 in the National Assembly, but lost millions of votes compared with the previous election in 2019. The DA's vote share remained stable and it has 87 seats.
Voters punished the ANC for high levels of poverty, inequality and unemployment, rampant crime, rolling power cuts and corruption in party ranks.