Charges against a group of Toronto drug squad officers have been thrown out.

The charges against the six were stayed after the judge agreed trial had been unduly delayed, violating the officers' right to a speedy hearing.

Ontario Superior Court Justice Ian Nordheimer said the pace in which the charges made it to court was "glacial," and as a result, the five officers and one former officer will not face 30 counts of corruption stemming from an investigation dating back to 2004.

The officers all pleaded not guilty.

John Rosen, one of the defence lawyers, said the men are "relieved.

"These officers are pleased that the matter has come to an end. They're saddened by the fact that they weren't able to face their accusers and be vindicated in the courtroom. But the main thing is they have suffered and suffered enough, and that what the court has found," Rosen told reporters outside the courthouse.

The policemen, all former members of the Toronto drug squad, had faced a slew of charges, including extortion, theft, assault, perjury, and obstruction of justice.

An internal investigation by a 25-member special task force was headed by then Chief Supt. John Neily of the RCMP and was assigned to look into corruption allegations against the officers in the now-defunct Central Field Command drug squad Team 3.

Neily referred a total of 218 charges against 12 officers to the Crown Law Office, but prosecutors recommended charging only six officers with 22 counts because only those had a "reasonable prospect of conviction."

It was said to be the biggest corruption investigation in the history of Canadian policing.

The task force cost the Toronto Police Service about $4 million and the RCMP about $1.2 million as of 2005, according to reports. An estimated $2 million more was spent in preparation for the trial.

Two previous internal probes had unearthed allegations of criminal activity in Toronto drug squads dating back to the early 1990s, but fell short of pursuing charges because of a lack of resources and limited scope, according to Neily's final report.

The investigation started after more than 200 drug cases were dropped by provincial prosecutors. A number of people accused in those cases had filed civil lawsuits. They alleged they had been been beaten and robbed by drug squad officers.

Ontario Attorney General Chris Bentley says his ministry is reviewing the judge's decision.