Victorian trainer Danny O'Brien says he and Mark Kavanagh were bullied by Racing Victoria over cobalt charges, which have been dismissed on appeal.
Kavanagh and O'Brien received respective three- and four-year disqualifications after five horses returned positive results for cobalt in 2014.
Justice Greg Garde dismissed the cobalt charges against the trainers at the Victorian Civil and Administrative Tribunal on Friday.
The judge said there was a problem with the evidence that Racing Victoria had relied upon.
"The tribunal finds that over the period of April 2014 until August 2015, the procedure for testing for cobalt substantially departed from the requirements," Justice Garde said.
"The test results are inadmissible as evidence against the trainers."
During their appeal, which began in October 2016, their lawyers said the Perth-based ChemCentre and Hong Kong Jockey Club laboratories were not accredited to test for cobalt at the time five horses from their stables returned positive results.
Despite the disqualifications, they have continued to train horses under a stay of proceedings.
Outside court, O'Brien said he knew he had done nothing wrong since the first positive cobalt result came back in 2014.
"When they came back, both Mark and I were adamant that we'd done nothing wrong," he told reporters.
He said Justice Garde's judgment confirmed their innocence.
"He's been very clear that neither Mark nor I had any intention of cheating or trying to break any rules of racing, that we're completely innocent of all charges," the trainer said.
O'Brien has criticised Racing Victoria's handling of their case, and says the state government needs to step in.
""The bullying and vilification of both Mark and I, and our families, by (chief racing steward) Terry Bailey and his integrity department has been quite incredible," the trainer said.
"It's time that Martin Pakula (racing minister) took a hard look at what is going on in the racing industry in this state."
Justice Garde has directed the Racing Victoria orders against the trainers be set aside.
Racing Victoria acting CEO, Giles Thompson, said they are disappointed with the judgment.
"We will review the decision," he said in a statement.
"What won't change is our commitment to protecting the integrity of the sport and ensuring all people engaged in Victorian racing and all horses can compete on a level playing field."