Humphrey Errington, 74, had been told he could sell his cheese after winning a lengthy fight with South Lanarkshire Council who wanted it declared unsafe following an E.coli outbreak that claimed the life of a young girl.
A sheriff had earlier ruled Errington Cheese did not breach safety standards and lifted an order stopping their Lanark Blue and Corra Linn being sold.
However, he ordered one batch of Lanark Blue and three Corra Linn should be destroyed.
But Mr Errington has now succeeded in saving the batches after a senior judge ruled Sheriff Robert Weir had been wrong to condemn them.
Sitting at the Court of Session in Edinburgh, Lord Bannatyne said the sheriff had “misdirected himself in law” when he ruled batches of the cheese had failed to comply with food safety requirements and should be destroyed.
He ordered the cheese should be released. Errington has said the Corra Linn can be kept but the Lanark Blue is unusable.
Mr Errington has now welcomed the decision and hit out at the council and Food Standards Scotland. He said: “We are now on cloud nine and view this as a comprehensive victory in our fight.
“These actions have been extremely detrimental to our business, with sales falling to as low as 25 per cent of pre-2016 levels, forced to lay off staff and funnel almost all our cash reserves, not to mention personal savings, into a costly legal battle.
“Once an agreement is reached, we’ll hopefully be in a position to re-employ some of our loyal workforce.”
Professor Hugh Pennington, emeritus professor of bacteriology at the University of Aberdeen, had given evidence backing Errington at earlier hearings at Hamilton Sheriff Court.
He said: “This ruling aligns with the science of the case, following hundreds of samples of cheese being extensively tested for E.coli 157.
“The court had previously ruled that Errington Cheese was produced in an entirely safe manner, and the very small number of E.coli strains that were detected were ones that have never been shown to cause harm to humans.
“This is an extremely rational decision and hopefully it can go some way to help the Erringtons get the business back on track.”
Errington had been linked to an outbreak of E.coli 0157 in which a three-year-old girl died two years ago.