Germany's iconic gummy bear has won a sweet legal victory over a foil-wrapped Swiss chocolate teddy.

Cologne's regional court ruled in favour of Germany's Haribo on Tuesday, saying that Switzerland's Lindt & Sprüngli had violated its trademark on the “Goldbär” or “Gold Bear” gummy bear name. It banned the further sale of Lindt's gold-foil wrapped chocolate bear.

The court said even though the Lindt product was officially called the “Lindt Teddy”, consumers would naturally refer to it as the “Gold Bear” because of its packaging.

The normal Haribo gummy bear package features a cartoon bear wearing a red ribbon around its neck, while the Lindt product features a bear caricature printed on gold foil, with a real red ribbon wrapped around its neck.

Bonn-based Haribo, which invented the ubiquitous gummy bear almost a century ago, had argued the two products often end up side-by-side on shelves and that consumers would be confused – even though one is fruit candy and the other is chocolate.

Lindt had argued there were enough differences to avoid confusion, adding that the packaging is in line with its gold bunny sold around Easter. It also said Haribo gummy bears are so well known by German consumers that they were not likely to confuse them with anything else.