A directors' bonuses tax loophole that deprived the public purse of £55 million has been successfully closed by HM Revenue and Customs (HMRC).
More than 100 businesses were using the dodge to avoid paying tax and National Insurance on their company directors' awards.
HMRC said its victory would save the equivalent of the annual salaries of around 2,400 newly qualified teachers.
Officials successfully challenged two companies, Cyclops Electronics and Graceland Fixing, a building company, in the upper tribunal over unpaid taxes totalling £350,000.
Specially created companies had issued bonuses to directors in £10 loan notes, taking advantage of legislation that provides tax relief for genuine commercial transactions.
The laws have now been amended to close the loophole and prevent further attempts to exploit the rules.
HMRC Director General for the Customer Compliance Group Penny Ciniewicz said: "We cannot allow tax avoidance schemes like these to deprive the UK of vital revenue.
"The money we've protected in this case alone would be enough to pay the annual salaries of around 2,400 newly qualified teachers.
"The honest majority of people who pay their taxes shouldn't have to carry the burden of paying for the public services we need."
The victory is HMRC's ninth out of 10 tax avoidance cases taken to court in the last two years.