Cyril Ramaphosa was sworn into office as President of South Africa shortly after he was elected by parliament following the resignation of Jacob Zuma.
Mr Ramaphosa, who was elected leader of the ruling African National Congress (ANC) in December, was the only candidate nominated for election in the parliament on Thursday after opposition parties said they would not participate.
The main opposition party, the Democratic Alliance, refused to participate in the selection process, saying parliament should instead be dissolved and new elections take place.
Another party, the Economic Freedom Fighters walked out of parliament in protest, rejecting the plan to elect the new president.
Those protesting said the ANC's plan for electing a new leader was "illegitimate".
Mr Zuma was forced to quit his role after being linked to alleged corruption in the country.
If Mr Zuma had not resigned it would almost certainly have been ousted as public opinion went against him.
Upon resigning, Mr Zuma said: "Of course, I must accept that if my party and my compatriots wish that I be removed from office, they must exercise that right and do so in the manner prescribed by the constitution," he said.