The anti-corruption commission has been ordered to release seized properties belonging to former Nairobi Governor Evans Kidero within 72 hours.
Dr Kidero had moved to court accusing the Ethics and Anti-Corruption Commission (EACC) of harassing him with the intention of crippling him financially.
On Tuesday, Mr Justice Hedwig Ong'udi issued the directive giving EACC three days to return all the property it had seized from the former governor.
The judge also removed the Director of Public Prosecutions, Mr Noordin Haji, from the case. He said the office of the DPP had no role in the proceedings and had also not been cited for any violation.
Even though the properties were not listed in the ruling, among those EACC claims Dr Kidero transferred is Riverside Mansions Management Limited.
EACC raided properties and establishments which Dr Kidero owns directly or through companies associated with him, and harassed and intimidated tenants, occupants and patrons.
The former governor moved to court last month seeking temporary orders stopping the EACC from seizing his documents and properties on the basis of a search warrant issued on September 19.
EACC had, however, disputed his allegations of harassment, arguing that valuation was part of its investigation.
Initially, EACC wrote to the Chief Land Registrar asking for documents on parcels of land owned by Dr Kidero.
The anti-graft agency told the court that it did not know how Dr Kidero obtained its letters from the Land Ministry, and accused him of concealing information in those letters.
EACC, in its court papers, claimed that during its search on his premises, it came across documents showing he was in the process of transferring some of his properties.
The commission also claimed that it had sought restrictions on the properties alleged to have been transferred in a bid to conclude its investigations. However, in his suit papers, Dr Kidero alleged that some of the properties seized did not form part of the ongoing investigations against him.
He has accused the EACC detectives of forcefully entering his properties and detaining and handcuffing security guards employed to secure the premises.
He seeks to quash the search warrants on grounds that they were obtained with the aim of searching for incriminating evidence against him and his family.