A relieved Gary Portelli has had an ibuprofen conviction wiped from his record in light of other cases relating to the anti-inflammatory.
The Warwick Farm trainer was mystified when Za Magic tested positive to ibuprofen in late 2014 and he was fined $6000, later halved on appeal.
Earlier this year, Victorian stewards identified a rehabilitation centre as the source of several ibuprofen positives in horses treated there for injuries.
Those horses and one trained by Kris Lees in NSW that had spent time on the farm later produced erratic results to tests for the drug.
It wasn't until the other cases surfaced, Portelli realised Za Magic had been treated at the same establishment before coming to his stable.
"My case has been overturned and it is a great relief," Portelli said.
"I have been training since 1991 and have never had a positive and I couldn't figure out how this one happened.
"The horse came to me from Victoria ten months after he had been treated.
"It's good to get it off my record and have a clean slate again."
Racing NSW chief steward Ray Murrihy confirmed the conviction had been expunged from Portelli's record and the fine he paid returned to the trainer.
Darren Weir and Clinton McDonald were among the Victorian trainers to escape charges after the circumstances were revealed.
Because of the inherent risk of a positive test recurring despite several negatives, the horses involved have not raced since the discovery.
One of the theories is that the drug is absorbed into the body and released when the horses burn fat, in some cases up to 12 months later.
In the Lees case, City of Justice was treated at the Longwarry centre for a ligament injury between September 29 and November 27 in 2014 when he was in the name of another trainer.
He showed a low level of ibuprofen in a sample taken on August 2, 2015.
Lees had the horses tested five times before he was cleared to race in December last year but just a month later he returned a positive result.
The trainer was not charged.