South African Home Affairs Minister Malusi Gigaba succumbed to pressure to quit after a court found he’d lied under oath and a compromising video of him was circulated on social media.

Gigaba’s exit Tuesday bolsters President Cyril Ramaphosa’s assertion that he’s committed to clamping down on graft and reversing the mismanagement that characterized his predecessor Jacob Zuma’s almost nine-year rule. Gigaba served as Zuma’s public enterprises minister and finance minister, and a group of leading academics alleged that he helped facilitate the looting of state funds by businessmen allied to the former president.

“The president has accepted the minister’s resignation,” Ramaphosa’s office said in a statement. Gigaba took the decision “to relieve the president from undue pressure,” it said.

In February, the High Court found that Gigaba committed perjury when he denied authorizing a company owned by the billionaire Oppenheimer family to operate a private immigration terminal at Johannesburg’s main airport. Two higher courts upheld the ruling, and last month anti-graft ombudsman Busisiwe Mkhwebane instructed Ramaphosa to take disciplinary action against Gigaba.

Gigaba, 47, a former head of the ANC’s youth wing who was one of the party’s rising stars, denies any wrongdoing. He did, however, apologize for the video that he says was hacked from his phone and was only meant for his and his wife’s viewing.

Ramaphosa won control of the African National Congress in December and took office two months later after the party forced Zuma to quit. Ramaphosa initially retained Gigaba and several other Zuma appointees in the cabinet in a bid to help heal divisions within the ANC caused by the leadership race.

Now read: The massive salaries earned by university executives in South Africa