Under complex VAT rules, chocolate biscuits are subject to standard-rate VAT but cakes are zero-rated.
"We are pleased that the matter is now resolved," an M&S spokesperson told BakeryandSnacks.com. The company has not issued a statement and declined to answer any further questions.
Under the UK's complex tax system most traditional bakery products such as bread, cakes and Jaffa Cakes are free of VAT, but tax levies are payable on cereal bars, shortbread and partly-coated or wholly-coated biscuits.
Last year the European Court of Justice agreed that a teacake was not a biscuit, confirming that the Treasury should reimburse M&S for the wrongly paid levies.
But HM Revenue & Customs claimed they should not refund the sum because it was M&S consumers, not the company, that had footed the bill - over £3m - for the higher priced teacakes sold over two decades.
However, in the House of Lords last week three Law Lords upheld last year's European Court of Justice ruling that the retailer was entitled to a full refund.
Pringles not crisps
The M&S legal battle is redolent of the recent Pringles case in its intricacies.
In 2008 Proctor & Gamble, the maker of popular snack Pringles, was expected to save millions of euros in tax savings after the UK High Court ruled their product was not a crisp.
In a further example that reveals the convoluted UK rules behind Value Added Tax (VAT), the court said that Pringles could be sold tax-free because they do not have enough potato in their formulation.
With only 42 per cent of potato content the snack is neither wholly nor exclusively made from potato, and is also made from dough, making them more like a cake or biscuit.
Pringles in all flavours fall outside of the definition for crisps, and therefore are not subject to the 17.5 per cent tax that applies to "potato crisps, potato sticks, potato puffs and similar products made from the potato, or from potato flour, or from potato starch" defined in the 1994 VAT Act.
At the time, Justice Nicolas Warren asserted that Pringles also distinguished themselves from crisps through their packaging - the easily recognisable tube - and 'unnatural shape'.