Cyril Ramaphosa, head of the ruling African National Congress (ANC), has been sworn in as South Africa's president, fewer than 24 hours after the resignation of embattled ex-leader Jacob Zuma.

"I will try very hard not to disappoint the people of South Africa," Ramaphosa said on Thursday as he ended his speech to parliament, shortly after ANC politicians elected him.

Zuma's nine-year presidency came to an end on Wednesday, when the 75-year-old announced that he would heed an ANC order and stand down ahead of a scheduled no-confidence vote against him in parliament.

His resignation in a televised address to the nation came after weeks of pressure to step down due to long-standing corruption allegations.

The election of Ramaphosa was largely ceremonial, with no other candidates put forward for the presidency.

South Africa's two main opposition parties, the Democratic Alliance (DA) and the Economic Freedom Fighters (EFF), refused to vote for Ramaphosa, who served as deputy president under Zuma.

A number of EFF members also left the parliamentary chamber as proceedings began.

The EFF has called for the dissolution of parliament and fresh elections, citing no faith in the ANC government who they accuse of protecting Zuma.

Focus on corruption

But in his address to parliament, Ramaphosa pledged to work with the opposition and tackle corruption while finishing his predecessor's term, which ends with elections next year.

"Leave 2019 aside, let us deal with the current moment and work together on how we are going to improve the lives of our people, rather than grandstanding," Ramaphosa told the members of parliament.

"Issues that have to do with corruption, of how we can straighten out our state-owned enterprises and how we deal with state capture are on our radar."

Al Jazeera's Fahmida Miller, reporting from Johannesburg, said Ramaphosa's speech was likely to be well received by many South Africans.

"He spoke about appearing in parliament in future to exercise his accountability to the House and the country," Miller said.

This marked a change of direction from Zuma, Miller added, "who often dodged parliamentary questions and refused to answer any inquiries into government decisions clearly".