A Quebec court judge ended an insider trading case on Wednesday against the former CEO of online gaming company Amaya and his co-accused.

Salvatore Mascia granted the defence’s third motion to stay proceedings against David Baazov after rejecting two prior efforts.

The decision was made in response to the defence’s claim it was inadvertently given about 320,000 privileged documents it shouldn’t have seen.

The prosecution wanted them back.

The documents were among tens of millions of pieces of information as part of the process involving one of the largest insider fraud cases in Canadian history.

Quebec’s securities regulator, l’Autorite des marches financiers, charged Baazov and his associates with insider-related counts in 2016.

“We are obviously very disappointed with the judge’s decision,” the regulator said in a statement Wednesday.

“We are going to analyze the judgment very closely as well as assessing the pertinence of filing an appeal.”

The charges stemmed from an investigation into the US$4.9-billion deal to acquire PokerStars in 2014 that transformed the former Montreal firm into the world’s largest public online poker company.

Baazov had pleaded not guilty to five counts, including influencing or attempting to influence the market price of Amaya’s securities.

Two other people, Yoel Altman and Benjamin Ahdoot, and three companies faced 18 additional charges stemming from the regulator’s investigation and had also pleaded not guilty.

The trial had been going on for six weeks and had been expected to continue through the fall.

Mascia rejected a defence motion in January to have the charges tossed because of the delay in getting them to trial under a Supreme Court of Canada ruling known as Jordan.

He then rejected a defence request over claims that the prosecution wasn’t disclosing evidence in a timely fashion.

Amaya is now known as The Stars Group Inc. and has moved its operations to Toronto.