It is famous for its budget offers and rock-bottom prices but when the Lidl supermarket chain received several batches of high-grade cocaine at its Spanish stores last weekend it decided that that was one product which would not be making it on to the shelves.

Instead the budget supermarket group called in the police to solve the mystery of how a dozen of its stores had each received hundreds of thousands of euros worth of neatly wrapped cocaine mixed in with their fresh bananas.

The drugs were discovered at the bottom of banana boxes that went to stores in Madrid, Plasencia and the town of Cáceres. The bananas, which had been imported by sea from Ecuador, arrived at the Mercamadrid wholesale fruit and vegetable market in Madrid last week. There they were snapped up by buyers from Lidl and the Alcampo supermarket group.

It was not until a Lidl employee at a Madrid supermarket got ready to stack the bananas on the store's shelves that the curious packages lying under the bunches were discovered.

Similar cargoes of cocaine were later found at a dozen Lidl supermarkets, with more than 100kg (220lb) of the drug being discovered overall. The hunt for further batches was continuing yesterday. Police said the traffickers had somehow failed to pick up their cocaine, which had a street value of about €4.5m (£4.02m).

"They must have been afraid that we were on to them," Eloy Quiros, head of the Spanish police's organised crime unit, said today. He added that police were liaising with their Ecuadorean counterparts to find out exactly where the bananas had been packed.

In some cases the bananas had been peeled, with only the skin left behind, presumably so that the cocaine would not increase the weight of each 15kg box.

A Lidl spokesman said that the cocaine had not contaminated the bananas but that the fruit had, in any case, not been put on sale.

Police said Lidl had nothing to do with the smuggling operation and thanked the supermarket chain for its help in tracking down the cargo.