The courtroom broke into applause on Thursday afternoon after District Judge Siva Shanmugam acquitted former Central Narcotics Bureau chief Ng Boon Gay of corruption.
Ng said in Mandarin after the verdict: "The law is fair, the law is just."
The judge said that Ng had successfully rebutted the "presumption of corruption".
He added that the testimony of Ms Cecilia Sue - the prosecution's star witness - could not be believed as there were too many inconsistencies.
Ng's testimony, however, was consistent except for his claim that he had no knowledge of Ms Sue's dealings with the CNB.
Ng was accused of four counts of corruption for obtaining sexual favours from Ms Sue.