Cyril Ramaphosa has become South Africa’s president after embattled leader Jacob Zuma resigned.
The new president was the only candidate nominated in parliament on Thursday and the announcement was welcomed by singing in the National Assembly.
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 the party’s decision.
Mr Zuma faces numerous corruption allegations but denies any wrongdoing.
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.