Cyril Ramaphosa on Thursday promised to work very hard not to disappoint the people of South Africa after he was elected unopposed as the country's new president, hours after scandal-hit Jacob Zuma resigned under pressure.
The 65-year-old African National Congress president was elected unopposed in the National Assembly.
The announcement was welcomed by singing in the National Assembly.
The ANC has a large majority in parliament.
Opposition Economic Freedom Fighters party members walked out of the parliament in protest during the debate.
Ramaphosa, a wealthy former businessman serving as the leader of the ruling ANC party since December, was the only candidate nominated for the president's post.
"I truly feel humbled to have been given this great privilege of being able to serve our people," Ramaphosa told members of parliament after his election.
"I will try to work very hard not to disappoint the people of South Africa," he said, adding that he will act as a "servant of our people".
Earlier, 75-year-old Zuma on Wednesday stepped down after he was ordered by the ANC's national leadership to quit or face a no confidence emotion in Parliament.
His resignation ended an impasse with his ruling ANC party, which was planning to side with opposition parties in Parliament to oust the embattled leader through a motion of no confidence.
"I resign as President of the Republic (of South Africa) with immediate effect," Zuma said in a televised address, ending a nine-year tenure before his second and final term of office which was scheduled to end with national elections in 2019.
But he remained adamant that the decision of the ANC to replace him with Ramaphosa was "wrong".
"I disagree with the decision of the leadership of my organisation, (but) I have always been a disciplined member of the organisation," Zuma said in his 30-minute speech, pledging to continue to serve the political organisation he had joined as a teenager to fight from exile against the minority white apartheid government.
Zuma's resignation was met with jubilation across South Africa by business, civil society organisations and the citizenry, all of whom had united in their efforts to remove him from office.
He stands accused of having been influenced by various people to appoint people to ministerial positions and as heads of para-state bodies who would support state capture plans and corrupt activities to syphon of billions of rand of public money.
South Africa's elite police unit had on Wednesday arrested three people as they raided the Johannesburg home of India-born Guptas, a controversial business family linked to Zuma.
The embattled Gupta family own a range of business interests in South Africa, including computing, mining, air travel, energy, technology and media.
The Gupta brothers have been accused of wielding enormous political influence in South Africa, with critics alleging that they have tried to "capture the state" to advance their own business interests.
Zuma's links to the Guptas was one of the reasons he was being forced to resign before the 2019 general election.
The Guptas and Zuma have denied all allegations of wrongdoing.
Image: Cyril Ramaphosa addresses MPs after being elected president of South Africa in parliament in Cape Town. Photograph: Mike Hutchings/Reuters