Attorney Michael Gressett was charged with raping an office colleague three years ago. Gressett's lawyers argued that the sex was consensual and the charges politically motivated.
On Wednesday, the judge said while there was evidence to charge Gressett. State prosecutors introduced inadmissible evidence.
Back in February an arbitrator ordered the county to reinstate Gressett as a prosecutor ruling that the district attorney's office had no cause to fire him.