Two former London bankers were handed suspended jail terms and one a €14m fine for tax evasion in a landmark trial that is likely to unleash dozens of similar cases across Germany.

The ruling is the first criminal conviction for what the judge, Roland Zickler, called “a collective case of thievery from state coffers”.

Martin Shields and Nicholas Diable managed to avoid jail by closely cooperating with German prosecutors and shedding light on a complex tax evasion scheme that siphoned €400m out of German state coffers.

Known as “cum-ex”, the scheme involved trading shares at high speed on or just before the dividend record date – the day the company checks its records to identify shareholders – and then claiming two or more refunds for capital gains tax which had in fact only been paid to the state once.

On Wednesday the judge stated that the trades were illegal rather than merely exploiting loopholes in the law.

“Do we all want to live in a world where everyone is ripping each other off?” Zickler said, addressing the defendants at the regional court in Bonn.

Cum-ex trade flourished on an “industrial scale” in the years after the financial crash, as banks across Europe were bailed out by the state. Shields started his career in investment banking as a junior trader for Merrill Lynch, before moving to the London branch of Germany’s fourth-largest bank, HypoVereinsbank, where he met Diable.

The chief prosecutor, Anne Brorhilker, said a harsher sentence would have “covered up the fact that the greatest tax robbery in German history was not conducted by two individuals but hundreds of people”.

The Bonn court also seized €176m from MM Warburg, a Hamburg-based private bank that had links to most of the transactions under review in the trial. A spokesman for the bank said it would appeal the decision.

State prosecutors across Germany are currently investigating at least 600 individuals, including bankers, traders, advisers and lawyers, for having practised similar schemes. At least 130 banks are under suspicion of having taken part in cum-ex trades.

“There will be further trials,” said Zickler.

Estimates of the cum-ex scandal’s total financial damage to the German state range from €5bn to €55bn.

In his closing statement, the former investment banker Shields said he had set off on a journey that “began in a bubble and remained in a bubble”.

“Many things were taken for granted and – unfortunately – were not questioned sufficiently,” said the 42-year-old, whom the Bonn court ordered to pay €14m to compensate for the personal profits he had made. “Whatever was taken for granted back then, I now see turned out to have been the wrong path.”

With more and more parts of Europe under lockdown to curb the spread of the Covid-19 virus, the verdict in the 44-day trial was moved forward to ensure the two UK-based bankers could still attend the court in person.

• This article was amended on 23 March 2020 to make clear that the charges related to tax evasion and not tax fraud.