Cyril Ramaphosa and his wife Tshepo Motsepe welcomed dignitaries to the ceremony in Pretoria
South Africa has begun a "new era", President Cyril Ramaphosa announced as he was sworn in for a second full term in office.
He remains in office even though his party, the African National Congress (ANC), failed to secure a majority in parliament during last month's election.
The ANC subsequently made a deal with its long-time rival Democratic Alliance (DA) and other parties to form a coalition government.
Mr Ramaphosa hailed this government during his inauguration speech, but also warned that unless it addressed deep inequalities, the country could become unstable.
"Through the ballots that they have cast, the people of South Africa have made plain their expectation that the leaders of our country should work together," President Ramaphosa, 71, said solemnly.
"They have directed their representatives to put aside animosity and dissent, to abandon narrow interests, and to pursue together only that which benefits the nation."
South African dignitaries and African heads of states were invited to the inauguration.
They included the leaders of Nigeria, Angola, Zimbabwe, Congo-Brazzaville, and Eswatini, and gathered in the Nelson Mandela Amphitheatre outside the Union Building in Pretoria.
A huge crowd of supporters formed outside the official seat of government, waving national flags.
Cyril Ramaphosa – union leader, mine boss, president
Unity deal is a landmark moment in South Africa
Why voters fall out of love with liberation movements
Under a sharp blue winter sky, the Chief Justice Raymond Zondo, administered the oath of office.
"I swear I will be faithful to the Republic of South Africa… I will obey, observe and uphold the constitution and all other laws of the republic," the president said.
A band then played the national anthem. The rendition was followed by a 21-gun salute and a fly-past by army helicopters.
Aircraft passed a statue of former President Nelson Mandela during their fly-by
The ANC, which has governed since the end of the racist system of apartheid in 1994, lost its majority for the first time after the 29 May election produced no outright winner.
The party got 40% of the vote, a drop of 17 percentage points, and it lost 70 seats in parliament.
However lawmakers re-elected Mr Ramaphosa after the ANC made a power-sharing arrangement with the pro-business DA – who came second in the poll with 22% -and three smaller parties.
The free-market DA, is ideologically at odds with the ANC's social welfare traditions, and seen by many as catering to the interests of the white minority, which it denies.
But the two political opponents have agreed a common agenda of fixing the country’s infrastructure, providing basic services such as water and power, and creating jobs.
The coalition is a move to the political centre, because the ANC’s left-wing and populist breakaway parties rejected the invitation to join a national unity government.
Mr Ramaphosa told South Africans the coalition was committed to reversing inequalities and growing the economy. He also warned that the country was riven with deep divisions between the haves and have-nots.
Despite progress, “our society remains deeply unequal and highly polarized,” he said. “There are toxic cleavages and an incipient social fragmentation that can easily turn into instability.”
And he warned against “those who seek to stand in our way, to inflame tensions” and “undermine our institutions.” They will not succeed because South Africans are resolute, he said.
Mr Ramaphosa did not say to whom he was referring. But the uMkhonto weSizwe (MK) party formed six months ago by former President Jacob Zuma didn’t attend what it called the “farcical” inauguration.
The party, which won 15% of votes and obtained 58 parliamentary seats, also boycotted parliament’s first sitting last Friday.
It has since joined a counter-coalition of opposition parties, vowing to oppose the policies of what Mr Zuma described as an “unholy alliance” between black and white elites to benefit the markets, not the people.
It “must be crushed before it finds its feet,” he said, “in the streets, in the courts and in parliament.”
MK has said its protests would be peaceful. But there have been fears that Mr Zuma’s stance would trigger violence among his supporters, who carried out deadly riots in July 2021 when he was jailed for refusing to give evidence at a public inquiry into corruption during his administration.
Mr Ramaphosa is expected to appoint a cabinet in the coming days, which is to include the the DA and three other smaller parties. Together, the coalition accounts for 68% of seats in parliament.
The president is then expected to formally set out the policies aimed at rescuing the flailing economy.
There are many challenges ahead to navigate. They include potential ideological disagreements within the coalition, unhappiness from ANC elements on the left, and the risk of political opposition becoming volatile.
But many South Africans want it to succeed.
“This is a moment when we must choose to either move forward together,” Mr Ramaphosa said, “or risk losing all we have built.”
The former trade unionist and business tycoon first became president in 2018 when his predecessor, Mr Zuma, was forced to resign because of corruption allegations. Mr Zuma has repeatedly denied any wrongdoing.
A crowd gathered outside Union Buildings to support the president
Graca Machel (right), widow of former President Nelson Mandela, and her daughter Josina Machel were in attendance
The colourful ceremony included a march-past by the military
John Steenhuisen: The DA leader vowing to 'rescue' South Africa
Behind the 'Zuma tsunami' in South Africa
South Africa in eight charts
Still battling ‘economic apartheid’ 30 years on
Hunting the 'Big Five' on South Africa's walls
Go to BBCAfrica.com, external for more news from the African continent.
Follow us on Twitter @BBCAfrica, external, on Facebook at BBC Africa, external or on Instagram at bbcafrica, external
Africa Daily
Focus on Africa
Farage ‘won’t apologise’ for Ukraine comments after Starmer and Sunak criticism
Labour don't believe the polls – and they don't want you to either
Dog teams continue Tenerife search for Jay Slater
Dead Man Running: How mysterious punk band frontman became an international fugitive
Penis cancer cases increasing: Brazil sees 6,500 amputations in a decade
Stunning video shows Strawberry Moon rising over ancient Greek temple
Sheryl Crow: 'Resurrecting Tupac with AI is hateful'
Meet Wild Thang, voted world's ugliest dog
Diane von Furstenberg on 'magic' wrap dress and fearlessness
The schoolchildren being lured by rebels on TikTok
Inside Gaza aid depot: Food waits as Israel and UN trade blame
Pageantry, protest and a premiere: Photos of the week
The Outlaws must race against time to prove their innocence
Stephen Merchant’s comedy thriller has returned to iPlayer with a brand-new series
Why did Jeremy Clarkson take on farming?
Charlotte Smith visits the Oxfordshire Cotswolds to find out
Amy Poehler reveals her late night internet searches
The American comedy heroine also talks about her latest online purchase in Access All App
The commercial that rocked the advertising world
A story of tech revolutionaries, a Hollywood director and an ad unlike any seen before
Billie Eilish answers your questions
The gritty underworld of 90s Japan…
Why did Jeremy Clarkson take on farming?
The 12 days that changed Rooney's life
© 2024 BBC. The BBC is not responsible for the content of external sites. Read about our approach to external linking.

More Stories
From Commitments to Practice: Internet Society’s Priorities for WSIS+20 Implementation
Final Results of the 2026 Internet Society Board of Trustees Elections and IETF Selections
Community Snapshot—March