South Africa's High Court ruled on Wednesday that President Jacob Zuma, under fire for alleged corruption, must set up a judicial inquiry into state influence-peddling within 30 days.
In the latest in a series of judicial blows to Zuma's scandal-tinged administration, the court upheld recommendations by South Africa's anti-graft watchdog calling for an inquiry.
Zuma had challenged the move.
High Court Judge President Dunstan Mlambo said Zuma's application against the inquiry was "ill-advised and reckless" and an abuse of the judicial process.
Zuma had challenged the right of the report's author to call for a judicial inquiry and the appointment by the chief justice of a judge to head it. Zuma said it was his prerogative whether to set up such an inquiry.
It was not immediately clear if Zuma would appeal and a spokesman for Zuma was not immediately available to comment on the ruling.
Zuma has survived several votes of no-confidence in parliament.
In October the Supreme Court of Appeal upheld an earlier decision by a lower court that the nearly 800 corruption charges relating to an arms deal filed against Zuma before he became president in 2009 be reinstated.
Political instability, including questions over who will replace Zuma -- his African National Congress will choose its new leader over the weekend -- has been a major driver in South African debt being rated "junk."
South Africa's economy has grown lethargically over the last six years and the jobless rate stands near record levels.
Analysts say the political crisis is making it hard to reform the economy, improve social services and fight crime.
The influence-peddling inquiry was recommended in a report released a year ago by the Public Protector, the country's anti-graft agency. Zuma also sought to block the report's release.
The report focused on allegations that Zuma's friends, the businessmen and brothers Ajay, Atul and Rajesh Gupta, had influenced the appointment of ministers. Zuma and the Guptas have denied all accusations of wrongdoing.
'Abuse of process'
Ordering Zuma to pay the costs of the latest court challenge, Mlambo, the chief justice, said the president's conduct was "clearly objectionable ... and amounts to clear abuse of the judicial process".
Mlambo said a judicial commission was best suited to investigate the allegations against Zuma.
"The allegations ... detailed in the report are extremely serious," Mlambo said.
The court ordered that once the inquiry is set up, it should complete its task and present its report to Zuma within 180 days. The president would then have to inform parliament of the action he planned to take based on the inquiry's findings within 14 days of receiving its report, the court said.
Opposition leader Mmusi Maimane, who was at the court, welcomed the ruling.
"The judgment lays out a timeline ... we hope to get to the bottom of this," Maimane said, adding that his party would oppose any appeal in the case should Zuma launch one.
Thuli Madonsela, the report's author who was also at the court, said: "An allegation that the state has been captured in the interests of the president and his friends is an allegation that needs to be investigated immediately."
Her 355-page report, titled "State of Capture", stopped short of asserting that crimes had been committed, saying the watchdog lacked the resources to reach such conclusions and recommended that they be investigated by a judicial inquiry.
On Friday, the top court ruled that Zuma's appointment of a state prosecutor was not valid and should be set aside immediately. Zuma is appealing that ruling.