The case emerged when the retailer queried the standard VAT rating of its teacakes which it felt should be a zero-rated product.
While Customs officials agreed to the rating change, the amount of recoverable VAT was disputed.
In the first move of its kind, Customs invoked laws on un-just enrichment which prevents the government repaying VAT to companies if it means they would benefit unfairly because it is impossible to pass the recouped VAT back to the people who paid the tax originally.
Additionally, the introduction of a three-year cap on VAT repayments was introduced during the case which prevented Marks & Spencer from recovering the VAT it had paid on the teacakes.
The move was intended to limit the liability to the exchequer. A series of tribunal, High Court and then Court of Appeal hearings ended when the appeal court ruled against the retailer last month. M&S had argued that the VAT they were owed should be paid back promptly and the three-year cap was not very fair.
It is the first time Customs has successfully argued unjust enrichment.
The court ruled 90% of the VAT should be retained by the government.
A Customs spokesman said: ‘There is no way they could pass the money back to the public who bought the teacakes.’ Customs had never won such a case before.
The ruling capped a poor year for M&S, including its shock trading announcement in January 1999 and subsequent news that profits had been virtually halved to £655.7m for the year ending March 1999.
M&S could take its case to the House of Lords but it is waiting to learn the outcome over the referral of part of the case to the European court.
‘We are considering our position,’ said a spokesman.
Crowe Clark Whitehill , the top 20 accountancy firm, has announced the promotion of Chris Mould to partner
The latest opinions from Accountancy Age on Making Tax Digital, and outline plans to evolve the UK's corporate governance regime
Five million taxpayers are ow using digital personal tax accounts (PTA) as part of the making tax digital strategy, HMRC said
UK-based non-doms have paid ten times more tax than the average taxpayer, raising concerns over the Brexit impact on non-dom contributions and therefore, the economy