Two men accused of masterminding an extensive drug trafficking operation have had all charges against them dropped after a judge found Vancouver police had violated their rights on multiple occasions.

Dennis Alexander Halstead and Jason James Heyman were charged after a high-profile seven-month investigation, but the case against them fell apart in February, when a B.C. Supreme Court judge excluded the bulk of the evidence against them.

After a series of hearings that began last fall, Justice James Williams found there were several Charter violations by investigators.

"I do not make this decision without careful thought. As a result of this court's ruling, these criminal charges will not be adjudicated on their merits. That is regrettable; society deserves a better outcome," Williams wrote in a ruling posted online Tuesday .

The judge noted that the charges against the two men concerned a large-scale drug ring involving substantial amounts of fentanyl, heroin, cocaine and guns — items that inflict "horrific damage" on the community.

But, he went on, "where the police commit serious breaches in their investigational activities, considerable harm is done if the courts send the message that such transgressions count for little, or that they can simply be overlooked."

The court registry confirmed that all charges against the two men have been dismissed. A VPD spokesperson declined to comment.

$1.8 million in drugs

Halstead and Heyman were both arrested in 2015 as a result of an investigation nicknamed Project Trooper, and later charged with multiple offences including possession for the purposes of trafficking and illegal firearms possession.

Six people would eventually be charged, but Halstead was the principal target of the investigation, and Heyman was believed to be his business partner, according to court documents. The other four were said to be lower-level dealers.

The men were accused of running a criminal organization that supplied deadly substances to impoverished residents of the Downtown Eastside and distributed drugs throughout B.C. and Alberta.

At a 2015 news conference , investigators said they had seized $1.8 million in drugs, including 20.5 kilograms of cocaine, 1.6 kilograms of heroin, 12.2 kilograms of methamphetamine, 23,000 fentanyl pills and 228 kilograms of the painkiller phenacetin. Twelve guns, a crossbow and eight vehicles — including four with hidden compartments — were also taken during searches.

A photo compilation shows some of the items seized during Project Trooper. (Vancouver Police Department)

Halstead and Heyman were scheduled to go to trial this February, but before that could happen their defence lawyers filed a series of pre-trial applications alleging breaches of their constitutional rights.

The defence successfully challenged some of the key pieces of evidence police used to get search warrants for properties connected to the investigation.

Williams found that police had violated Halstead's privacy by setting up months-long video surveillance of his house without a warrant, that they had conducted an unreasonable search by swabbing vehicles and homes connected to the suspects without a warrant, and that they had improperly obtained passport photos of both Halstead and Heyman.

The end result was that Williams found three searches conducted on March 11, 2015 to have been effectively warrantless. Those searches included Halstead's Coquitlam home, Heyman's Surrrey apartment and an alleged stash house in New Westminster.

Bringing justice into 'disrepute'

Going even further, the judge ruled that when Halstead and Heyman were arrested at the time of those searches, police violated their rights by stalling when they asked to speak to their lawyers. And finally, the officers had failed to file reports in a timely manner after the searches, yet another breach of their obligations.

"These breaches, considered individually and cumulatively, are of such seriousness and impact that, having regard to all the circumstances, admitting that evidence in the trial proceedings would bring the administration of justice into disrepute," Williams wrote.

Vancouver police seized about $1.8 million in drugs in the Project Trooper investigation. (CBC)

The judge said the evidence taken during the searches should be excluded from the trial, effectively killing the prosecution.

In the end, however, Project Trooper was not a complete loss. Two of Halstead and Heyman's co-defendants, Charleen Teresa Flintroy and Cameron Mak, have both pleaded guilty to two counts each of possession for the purposes of trafficking and are awaiting sentencing.