Marks & Spencer has started legal action in the UK against Aldi in an effort to protect its Colin the Caterpillar cake, claiming that its rival's Cuthbert the Caterpillar product infringes its trademark.

The dispute has gone viral on social media, with users making jokes and sharing photos of their own caterpillar cakes.

M&S, which lodged an intellectual property claim with the High Court in London this week, is arguing that the similarity of Aldi's product leads consumers to believe they are of the same standard and "ride on the coat-tails" of M&S's reputation with the product.

M&S wants Aldi to remove the product from sale and agree not to sell anything similar in the future.

M&S launched Colin the Caterpillar around 30 years ago and his appearance has been substantially unchanged since around 2004, except for adaptations for events such as Halloween and Christmas, and related products such as Connie the Caterpillar.

The product is central to M&S's partnership with cancer charity Macmillan, and the retailer has created a Colin product for the annual World's Biggest Coffee Morning fundraising event.

The cake is a sponge with milk chocolate and buttercream, topped with chocolate sweets and a smiling white chocolate face.

M&S has three trademarks relating to Colin, which the retailer believes means Colin has acquired and retains an enhanced distinctive character and reputation.

A spokesman said: "Because we know the M&S brand is special to our customers and they expect only the very best from us, love and care goes into every M&S product on our shelves.

"So we want to protect Colin, Connie and our reputation for freshness, quality, innovation and value."

The dispute has provoked great mirth on social media, with users quickly taking sides in what has become known as the #CaterpillarWars on Twitter.

Others were quick to point out that many other supermarkets also have caterpillar-themed cakes.

Aldi's UK operation joined in the discussion.

And it wasn't long before other supermarkets got involved.