German investigators say they have discovered a huge cocaine ring in which hundreds of kilograms of the drug are believed to have been smuggled into the country in boxes of bananas.

Prosecutors have charged eight men with involvement in the ring, said to have been one of the biggest of its kind in German history.

The men are believed to be part of a wider network still thought to be in operation, which was responsible for bringing two tonnes of cocaine into Germany between April 2017 and September 2018.

Evidence of the ring first came to light when supermarket workers in Bavaria came across small bags of cocaine tucked down the sides of banana boxes. The operation was brought to light by reporters from the Süddeutsche Zeitung and German broadcasters NDR and BR.

Police were able to trace the cocaine supplies back to the warehouses where they had been stored after arriving from Ecuador. The warehouses – so-called ripening halls – had been broken into on several occasions by armed men.

Police ascertained that the bananas and cocaine supplies had been transported in the banana boxes from Ecuador and that the gang was contracted to break into the warehouses and remove the drugs, seizing up to 320kg a time.

The men are in custody in Landshut, Bavaria, where they are due to go on trial imminently. A surveillance operation to track the men involved around 500 customs officers, police and prosecutors who tracked eight break-ins at ripening halls in the states of Bavaria, Hesse, North Rhine-Westphalia and Saarland. They bugged the men’s telephone conversations and radio communications.

The group is believed to have been steered by other men in Hamburg. One of the main defendants in the upcoming court case is a 21-year-old identified only as Dario L, who is believed to have controlled operations from his rental flat in the northern port city, where police found delivery receipts for bananas. A 40-year-old identified only as Alberto K, is believed to have headed the plot.

In a separate case, though it is believed to be linked to the eight men due to go on trial, four men were convicted in December by a Hamburg court of acting as courier drivers who planned to transport 180kg of cocaine from Hamburg to the Netherlands. Hamburg’s state prosecutors are appealing against the men’s mild jail sentences.

Peter Keller from the customs investigation bureau, who headed the operation to smash the ring, told German media he believed the police operation had “left its mark on the scene”.

He called it a “vital network, which, thanks to our successful investigation, is for now at least dysfunctional.” But he said the members of the gang now in custody were likely “to be replaced by new ones soon”.