McKinsey will repay tens of millions of dollars in fees to South Africa after a judicial inquiry into alleged systemic corruption in the country uncovered evidence of irregularities in contracts that the consultancy firm had with a local partner at government-owned companies.

The firm has undertaken to pay back all of the money that it earned on the contracts, an amount that is “likely to be around R650m ($43m)”, the judicial inquiry said on Wednesday, a day before senior McKinsey partners will appear before it.

McKinsey already paid back R1bn to South Africa in 2018 after it did work at the state power monopoly, Eskom, alongside a company linked to the Guptas, a family accused by multiple witnesses at the inquiry of using its influence with the former president Jacob Zuma to loot major public contracts.

The consultancy apologised for the scandal over Eskom, which cost it major clients in Africa, even as its own investigation found no evidence of corruption by its partners.

However, in recent weeks South Africa’s inquiry into the claims of so-called “state capture” involving the Guptas presented McKinsey with evidence querying further contracts it had from 2012 to 2016 with another Gupta-linked company, Regiments, as well as with the state-owned logistics group Transnet and South African Airways.

“This evidence suggested irregularities in the contracts of McKinsey alongside Regiments at Transnet and SAA but did not implicate any current employees or partners of McKinsey in any corruption or impropriety in relation to these contracts,” the inquiry said on Wednesday.

The inquiry “suggested to McKinsey that it should repay the fees that it had earned on the Transnet and SAA contracts as an act of responsible corporate citizenship,” it said.

McKinsey broke off ties with Regiments in early 2016 as allegations about the group’s political ties mounted. Three senior McKinsey partners will appear before the inquiry on Thursday, including Jean-Christophe Mieszala, the firm’s global chief risk officer.

In a statement, McKinsey said “in line with our determination to do what is right and be guided by our firm’s earlier commitments to Eskom, we will return fees for projects that — even indirectly — may have been related to State Capture. That is not something our firm is willing to accept.”

Headed by Raymond Zondo, South Africa’s deputy chief justice, the inquiry’s near-daily hearings have been the most high-profile symbol of a clean-up promised by Cyril Ramaphosa, who replaced Mr Zuma as president in 2018. The Guptas, who fled South Africa as Mr Ramaphosa took the presidency and leadership of the ruling African National Congress, have denied wrongdoing.

Several big-name global firms beyond McKinsey have been linked to the South African state capture scandal. KPMG apologised for working with a company linked to the Guptas and Bain said in 2018 that work for South Africa's tax authority, which was undermined in the scandal, “fell short of our operating principles”. Bell Pottinger, the British public relations company, collapsed in 2017 over evidence that it sought to defend the Guptas from the scandal by stirring up racial tensions.

“The proceedings of the commission are replete with examples which ought to move other multinational and domestic companies to follow McKinsey’s lead,” the inquiry said on Wednesday.

It “will be watching closely to see which of these companies do so and which choose not to conduct themselves as responsible corporate citizens”, it added.

This article has been amended to clarify that Bain did not have contracts with companies tied to the Guptas.