The government's long-running case against Marks & Spencer over the VAT of teacakes could cost it as much as £3.5m.

Between 1973 and 1994, M&S' teacakes were wrongly classified as chocolate-covered biscuits, which are taxed at the standard rate instead of at a zero-rate for cakes. M&S has demanded a full refund but Customs and Excise has argued this would “unjustly enrich” M&S because 90% of the refund would have been passed on to its customers.

However, Juliane Kokott, advocate general of the European Court of Justice, yesterday backed M&S: “The objection that M&S has been enriched cannot be invoked as long as it offends the principle of equal treatment,” she said.

The opinion will now be considered by the full European Court of Justice before a final verdict is announced early next year.