A South African court on Wednesday reprimanded President Jacob Zuma as "seriously reckless" after he challenged the recommendations of the country's anti-corruption watchdog for a graft probe against him.
The High Court in the capital Pretoria ordered Zuma to appoint within 30 days a judicial inquiry into the allegations that have hung over him and his associates.
The ruling came days before a crucial elective conference of the governing African National Congress (ANC), where Zuma is due to step down as leader.
Zuma had tried to dodge implementing the recommendations contained in a scathing 2016 report by South Africa's corruption watchdog.
But judge Dunstan Mlambo dismissed Zuma's case, saying the "the president was seriously reckless in pursuing it as he has done".
The judge said the watchdog's report "uncovered worrying levels of malfeasance and corruption" and had presented Zuma with an opportunity to "confront and address the problem".
But the president had chosen to challenge it in court, "further delaying the resolution" of the allegations, Mlambo added.
"The president had no justifiable basis to simply ignore the impact of this corruption on the South African public," he said.
The judge added that Zuma's conduct fell "short of the high standards" expressed in the constitution.
He also ruled that Zuma should personally pay the litigation cost for a different case, in which he had sought to halt the release of a report linking him to the wealthy Gupta family.
The business family of Indian origin is accused of having undue influence over Zuma's government, including power over the appointment of some cabinet ministers.
Zuma had tried to block the publication of the report arguing that he had not been granted enough opportunity to respond to the charges.
Zuma steps down next week as president of the ANC after a 10-year term marked by damning court judgements against him.
He will resign as state president after general elections in 2019.