BATHURST, N.B. -- A judge has thrown out manslaughter charges against two New Brunswick police officers in the shooting death of a Tracadie businessman two years ago.

Const. Patrick Bulger and Const. Mathieu Boudreau were charged in the death of 51-year-old Michel Vienneau, who was shot in his vehicle outside the Bathurst train station on Jan. 12, 2015.

Judge Anne Dugas-Horsman ruled in Bathurst provincial court Friday that the prosecution failed to make their case after a preliminary hearing.

"It is my ruling ... you are both discharged of all charges," said Dugas-Horsman.

There was applause in the packed courtroom following the ruling and both police officers wept. Neither spoke as they left the courtroom.

"Constable Bulger is relieved. It has been a long year and a half," Bulger's lawyer, Brian Munro, told reporters.

"It's a tragic situation and accidents are sometimes fatal. There is no joy today, no reason to celebrate, but there is relief."

Munro called the ruling "a sound decision."

The officers were investigating whether Vienneau and his common-law partner were in possession of illegal drugs after returning from a trip to Montreal.

Vienneau's partner was with him in the vehicle at the time of the shooting, and alleges in a civil lawsuit that his death was caused by police negligence.

In a statement of defence, the City of Bathurst said the officers clearly identified themselves to Vienneau and had tried to stop his vehicle before it accelerated, pinning an officer against a snowbank. It says one officer fired at the car as it moved toward his colleague.

An RCMP investigation later found that Vienneau, who owned an electronics store, was not involved in criminal activity.

Bulger, 38, and Boudreau, 26, had each faced charges of manslaughter with a weapon, assault with a weapon and unlawfully pointing a firearm.

Crown attorney Stephen Holt said the Crown is examining its options and may appeal, or could examine going to trial through a direct indictment.

He said Vienneau's family is disappointed.

"They don't understand. They are not going to talk about it at this point because they understand that it is still before the courts," he said.

Those family members rushed ahead of reporters and television cameras, and went direct to waiting vehicles without offering any comment.

Bathurst City Police Chief Eugene Poitras said previously the two officers had been suspended, with pay, until the court process was concluded.

"Our objective when this happened, regardless of the outcome, we wanted an independent investigation. Now this is what happened today and I can't comment any further on that," he said Friday.

The officers won't be returning to duty right away. Poitras said there would have to be a review first, and couldn't say how long that might take.

The New Brunswick Police Commission, which investigates complaints related to police conduct, had suspended its own investigation until the criminal process concluded.