South Africa's ruling ANC party rallied around embattled President Cyril Ramaphosa on Monday, on the eve of a parliamentary vote that could lead to his impeachment.
In an eventful day, Ramaphosa, who has been under heavy political pressure, mounted an 11th-hour legal bid to have a damning report on an alleged cover-up of a cash robbery at his farm annulled.
Top African National Congress leaders who had met to discuss his future decided to stand by the president and oppose any motion seeking to remove him.
"Should parliament proceed tomorrow, the ANC will not support that vote," ANC interim secretary-general Paul Mashatile told reporters after day-long talks.
Parliament is scheduled on Tuesday to debate the report submitted last week by an independent panel which found that Ramaphosa "may have committed" serious violations and misconduct.
The parliament sitting is a step that could lead to a vote on forcing Ramaphosa from office.
For him to be forced out, two-thirds of the assembly must vote in favour of a removal motion. The ANC has 230 out of 400 seats.
In papers filed to the Constitutional Court and made available to the media by his spokesman, the president petitioned to have the report "reviewed, declared unlawful and set aside".
The move helped consolidate party support for Ramaphosa, as Mashatile cited it as the reason for the decision by the ANC's highest body -- the National Executive Committee (NEC) -- to back Ramaphosa.
The president has insisted he would not resign after the special panel's report, but his political future remains uncertain.
On Monday he briefly attended an NEC meeting which discussed the crisis.
He left shortly afterwards, smiling and waving to the media, having recused himself from the meeting, in line with standard practice for a person under discussion.
Forged by Nelson Mandela into the weapon that led the fight against apartheid, the ANC has been deeply divided by the affair, but after a pendulum swing a majority now seems be backing the president.
A small group of demonstrators, some supporting the president, others calling for him to go, gathered outside the meeting in the Johannesburg area of Nasrec.
The scandal has become known as the Phala Phala affair, named after Ramaphosa's farm in the northeast of the country.
It began in June, when South Africa's former spy boss filed a complaint with the police alleging that Ramaphosa had concealed the theft of a huge haul of cash from the farm.
He accused the president of having organised for the burglars to be kidnapped and bribed into silence. Ramaphosa has denied any wrongdoing.
He said the cash -- more than half a million dollars, stashed beneath sofa cushions -- was payment for buffaloes bought by a Sudanese businessman.
But his explanations did not convince the independent panel, which raised questions about the source of the cash and said he "may have committed" serious violations and misconduct.
A police inquiry is ongoing, but he has not so far been charged with any crime.
The scandal comes at the worst possible time for Ramaphosa.
On December 16, he will contest elections for the ANC presidency -- a position that also holds the key to staying on as the nation's leader.
A former mine union president who made a fortune in business in post-apartheid era, Ramaphosa came to office in 2018 riding on a graft-free image after the corruption-tainted presidency of Jacob Zuma.
His spokesman, Vincent Magwenya, on Saturday said Ramaphosa would not resign on the basis of a "flawed" report and would contest the document in court.
Julius Malema, an ex-ANC youth leader and now president of the opposition Economic Freedom Fighters, called for Ramaphosa to "be arrested -- he committed crime, he committed corruption".
But the ANC's overwhelming majority in the National Assembly means that it is not even certain that parliament will vote to launch the removal procedure.
As well as Ramaphosa, some legal experts have outlined flaws in the report.
They argue that without recourse to the ongoing criminal investigation, the document is based largely on hearsay, Ramaphosa's statements and the initial complaint lodged by an opponent of the president.