CAPE TOWN — President Cyril Ramaphosa of South Africa “deliberately misled” Parliament about the nature of a $36,000 donation toward his campaign in 2017 from Bosasa, a logistics company that featured heavily in a commission examining corruption at the highest levels of government, the country’s public protector said on Friday.
The protector, Busisiwe Mkhwebane, who leads the government’s anticorruption agency, also said that Mr. Ramaphosa had violated the ethics code of his party, the African National Congress, which gave him 30 days to disclose his campaign funding in full.
Mr. Ramaphosa took office pledging to root out corruption within the A.N.C., which has dominated South African politics since the end of apartheid, but has faced strong opposition from a rival faction within his party. The ruling against Mr. Ramaphosa posed a significant political risk at a time when some of his opponents were facing their own scrutiny over alleged misconduct.
Confronted with evidence of the donation last year, Mr. Ramaphosa initially told Parliament that the money had been paid to his son, Andile, a businessman who the president said was working with Bosasa.
But after Mr. Ramaphosa’s son denied involvement in the transaction, the president changed tack and said that the donation had been made without his knowledge.
Bosasa has been accused by several whistle-blowers, including its former chief operating officer, of using bribes “like monopoly money” to win lucrative contracts from government officials.
The announcement from the public protector’s office came shortly after Jacob Zuma, Mr. Ramaphosa’s predecessor as South African president, withdrew from the high-level inquiry into government corruption, ending a prolonged standoff that has reflected deep divisions within the A.N.C.
“We are here to tell you that we will take no further part in these proceedings,” said Mr. Zuma’s lawyer, Muzi Sikhakhane. The hearings in Johannesburg had been postponed since Wednesday, when Mr. Zuma’s legal team complained that he had been “brought in under false pretenses.”
Mr. Zuma left office last year under a cloud of suspicion about his conduct, and the commission, led by Judge Raymond Zondo, was established to explore allegations of corruption so pervasive that it has come to be known as state capture. Mr. Zuma’s lawyers argued that the commission had overstepped its mandate in posing detailed questions to the former president.
The line of questioning included the allegations that Mr. Zuma had allowed the Guptas, an Indian business family, to dictate government policy, to the extent that they were allowed to select cabinet ministers sympathetic to their interests.
“Zuma cannot afford to have on record detailed statements which might turn out in a criminal case to be false,” said Pierre de Vos, a constitutional law expert at the University of Cape Town. Instead, Mr. de Vos said, the former president was “trying to discredit the commission.”
The commission was established after an investigation by a former public protector, Thuli Madonsela, that found evidence to suggest corruption in Mr. Zuma’s administration. It does not have prosecutorial powers, and any charges would need to be pursued by the police and the national prosecuting authority.
Among Mr. Zuma’s few substantive admissions in hearings this week were that he helped the Gupta family start a newspaper, The New Age, and satellite news channel, ANN7. Both media houses, which benefited from preferential government advertising, became known for supporting the Zuma administration before they shut down.
“In this country the media is very biased,” Mr. Zuma told the commission, justifying his close involvement in the process. The outlets had “brought a fresh air to the country,” he said, adding: “There was no law broken.”
But Mr. Zuma was more evasive on other matters, saying he had either forgotten or been unaware of critical details. He said he could not recall seeing Vytjie Mentor, a member of the A.N.C., at the Guptas’ home in 2010, when Ms. Mentor said they offered her the position of public enterprises minister.
Asked about making a request for a government spokesman, Themba Maseko, to “help” the Guptas, Mr. Zuma said he did not remember doing so. And he said he did not recall orchestrating the appointment of the chief of the state-owned rail and port agency, Transnet, which was riddled with corruption that cost the state hundreds of millions during his administration.
“I don’t remember myself insisting on this,” Mr. Zuma said.