Cyril Ramaphosa has been elected as South Africa’s president just hours after the country’s scandal-plagued leader Jacob Zuma resigned on Wednesday.

Zuma heeded the orders of the ruling African National Congress to end to his nine years in power.

The ANC, which replaced Zuma as party leader in December with then Deputy President Ramaphosa, had ordered him to step down on Tuesday. When Zuma failed to resign, it announced it would back an opposition motion in parliament to force him out.

Ramaphosa, 65, has put the focus on rooting out corruption and revitalizing economic growth.