Cyril Ramaphosa has been sworn in as President of South Africa after he was elected by parliament, a day after the resignation of Jacob Zuma.

The 65-year-old has put the focus on rooting out corruption and revitalising economic growth.

The African National Congress, which has a large majority in parliament, nominated Mr Ramaphosa, a wealthy former businessman, "to be elected as the new President of the Republic of South Africa".

Members of the party broke out into song and dance after his election.

The road back to prosperity and self-respect under Mr Ramaphosa, who became ANC head in December, will be long and hard in a nation divided by race and inequality.

But Mr Zuma's departure offers evidence of the strength of South Africa's institutions, from the courts to the media and the constitution.

He resigned as president late on last night after nine years in office.

The 75-year-old said in a 30-minute farewell address to the nation he disagreed with the way the ANC had pushed him towards an early exit, but would accept its orders.

"Defiant in defeat" and "Going, Going, Gone" were some of the newspaper headlines that captured Mr Zuma's reluctance to leave.

The foundation set up to guard the legacy of the late anti-apartheid icon Nelson Mandela said Mr Zuma's resignation brought to an end "a painful era for the country".

Mr Ramaphosa will fill the role until elections next year.

Mr Ramaphosa's first state of the nation address is expected to take place tomorrow.

The speech had been scheduled to be delivered by Mr Zuma last Thursday, but was postponed after pressure mounted for him to resign.

The rand currency, which has gained ground whenever Mr Zuma hit political turbulence, soared to a near three-year high against the dollar on Mr Zuma's resignation.

Mr Zuma's resignation came just hours after police raided the luxury home of the Gupta family, Indian-born billionaire allies of the former president who have been at the centre of corruption allegations against Mr Zuma and his circle for years.

Mr Zuma and the Guptas have always denied wrongdoing.

Police said three people were arrested during the raids on various properties in Johannesburg.

Mr Ramaphosa, 65, must revive the economy and crack down on with what he has admitted is rampant government corruption if he is to boost the party's tarnished reputation before a tricky election next year.

He is a former trade unionist and Mandela ally who led talks to end apartheid in the early 1990s and then became a hugely wealthy businessman before returning to politics.

Mr Zuma's hold over the ANC was broken in December when his chosen successor - his former wife Nkosazana Dlamini-Zuma - narrowly lost to Mr Ramaphosa in a vote for the new party leader.