In a two-to-one decision, the province's highest court has rejected the Crown's attempt to appeal the controversial decision.
Superior Court Justice James Brunton ordered the release of the 31 in 2011 after he decided it would take too long for their trial dates to come around.
He stressed at the time his decision had nothing to do with guilt or innocence — but with the fact the justice system was ill-equipped to deal with the complex file.
While two of the appeals court justices upheld Brunton's decision, one agreed with the Crown that the trial judge erred by releasing the accused.
They had been arrested as part of a massive police operation in 2009.
Charges against the more than 150 accused included murder, gangsterism, drug trafficking and conspiracy.
Some have pleaded guilty while others — as many as 100 — are still awaiting trial.
The 31 who were released were not facing murder charges but were looking at charges of gangsterism and drug trafficking.
Since Brunton's decision, the federal government has moved to help the justice system manage megatrials better.