Nhlanhla Nene resigned after he admitted to visiting a business family at the heart of a corruption scandal.

South Africa‘s finance minister has resigned after acknowledging missteps during the scandal-tainted tenure of former president Jacob Zuma while testifying in a corruption inquiry.

Nhlanhla Nene resigned over discrepancies in his accounts of meetings with a business family at the heart of a corruption scandal, President Cyril Ramaphosa announced on Tuesday.

“I have decided to accept his resignation,” Ramaphosa told journalists in Cape Town.

Ramaphosa, who has pledged to clean up corruption and revive South Africa’s struggling economy, has appointed Tito Mboweni, a former head of the South African Reserve Bank, as the new finance minister.

Nene faced calls to resign after he admitted to visiting the Gupta brothers, friends of the former president Jacob Zuma who have been accused of high-level influence-peddling, and failing to disclose the meetings earlier.

Nene was initially hailed as a hero when he told the inquiry that Zuma had fired him in 2015 for “refusing to toe the line” on projects that would have benefited the wealthy Gupta family and others close to the then-president.

Nene told the inquiry that it was his belief that his refusal to sign off on a massive nuclear deal ultimately led to his dismissal in 2015 – which saw the rand crash.

The Gupta family have been accused of using their friendship with Zuma to siphon off billions of rand in state funds and of inappropriately influencing cabinet appointments.

Both Zuma and the Guptas – who are at the heart of the inquiry into so-called “state capture” – have denied any wrongdoing.