Cyril Ramaphosa has become South Africa’s president a day after embattled leader Jacob Zuma resigned.
He was the only candidate nominated in parliament on Thursday so no vote was needed to make him president. MPs from the ruling African National Congress broke into song at the announcement.
In a speech to parliament Mr Ramaphosa, 65, said that corruption was on his radar.
The ANC had told Mr Zuma to step down or face a vote of no-confidence.
In a televised statement he said he was quitting with immediate effect but said he disagreed with his party’s decision.
Mr Zuma faces numerous corruption allegations but denies any wrongdoing.
Africa Live: Updates as Ramaphosa takes over
Ramaphosa – union leader, mine boss, president
South African press applauds Zuma exit
Long read: The many trials of Jacob Zuma
One opposition party, the Economic Freedom Fighters, walked out of the parliamentary debate. It wants new elections, rather than the ANC deciding on the identity of the new president.
Presentational grey line
Dream finally realised
Analysis: Lebo Diseko, BBC News, Johannesburg
It is often said that Mr Ramaphosa has had his eye on the position of president since the ANC came to power in 1994.
The story goes that he was so upset at not having been chosen by Nelson Mandela as his successor that he left politics and went into business.
But Mr Ramaphosa has now finally realised that dream.
He has said his priority is reviving South Africa’s battered economy. But it won’t be easy: Unemployment is currently at almost 30%, a rate which rises to nearly 40% for young people.
Low growth rates and dwindling investor confidence were compounded by two credit agencies downgrading the economy to junk status.
One of the first steps in improving that investor confidence is addressing the persistent claims of corruption at the heart of government.
What next for South Africa?
Six reasons why Zuma quit
Zuma – the survivor whose nine lives ran out
Presentational grey line
There is a renewed sense of hope as Mr Ramaphosa is taking over the reins of Africa’s most industrialised economy.
The markets appeared to welcome Mr Zuma’s resignation. The South African currency, the rand, reaching its strongest levels in three years – at 11.6570 rand for $1 in early trading.
Some will miss him though, pointing to achievements like announcing the abolition of fees for higher education, says the BBC’s Milton Nkosi in Johannesburg.
Mr Zuma, a former member of the ANC’s military wing in the days of apartheid, rose through the ranks of the party to become president. He led the country for more than a third of its time after apartheid.
But he leaves office with several scandals hanging over him, and with South Africa’s economy in dire straits.
Image copyright REUTERS Cyril Ramaphosa, left, with Jacob Zuma
Image caption Cyril Ramaphosa, left, was the deputy president to Jacob Zuma
On Wednesday, police swooped on the Johannesburg home of the powerful and wealthy Gupta family.
Eight suspects appeared in court on Thursday on fraud and money laundering charges, local media report. But they did not include any of the best-known Gupta brothers – Ajay, Atul and Rajesh.
Among the eight in court was Varun Gupta, who was Chief Operating Officer of the Gupta-owned mining firm Oakbay Resources and Energy. He is yet to make a plea in court.
The Guptas have been accused of using their close friendship with the president to wield enormous political influence. They deny all allegations of wrongdoing.