HALIFAX -- Nova Scotia's top court has ordered a new trial for a former medical student who was convicted of first-degree murder three years ago in the August 2015 death of 22-year-old Taylor Samson.

In a written ruling released Wednesday, a three-member Nova Scotia Court of Appeal panel said the trial judge erred in not declaring a mistrial after learning that a private detective employed by the defence gave information to Halifax police -- something that was initially unknown to Sandeson's defence.

Justice David Farrar wrote that the late disclosure at trial of the collaboration between police and private detective Bruce Webb, "significantly infringed" William Sandeson's right to "full answer and defence and to a fair trial."

Farrar also said that Justice Josh Arnold's ruling that Webb's information was not material to the murder case against Sandeson restricted Sandeson's ability to respond to the merits of the Crown's case.

"In my view, such limiting is a legal error," the judge wrote. "The right to make a full answer and defence includes not only the ability to challenge the Crown's case on the merits but also the ability to advance reasonable charter and/or other process-oriented responses to the charges."

Sandeson and Samson were students at Dalhousie University in Halifax, and court was told Sandeson fatally shot Samson during a drug deal at Sandeson's apartment.

Sandeson, now 27, was sentenced in July 2017 to life in prison with no chance of parole for 25 years, while Samson's body has yet to be found.

During the appeal hearing in January, Sandeson's lawyer Ian Smith said Webb told police about a key aspect of the case and asked to remain an anonymous source. He added that police kept the information secret and "failed to get any legal advice."

It was revealed that Webb was told to interview two of Sandeson's neighbours, both of whom initially told police they didn't see or hear anything the night of the crime. But when Webb talked to them, they admitted they had seen a badly injured man in Sandeson's apartment.

Court heard that Webb, worried about facing a possible obstruction of justice charge, told an investigator it would be wise for police to conduct another interview with the two men, which they did.

The information only came to light in the middle of Sandeson's Nova Scotia Supreme Court trial.

"The police should have immediately notified the Crown of Webb's actions so the Crown could then have alerted the defence to what Webb had done," wrote Farrar.

But Farrar also noted that he didn't want to appear "overly critical" of the trial judge who faced challenges given the situation.

"The startling revelation of Webb's relationship with the police, and how to deal with it in the middle of a murder trial before a jury, caught everyone by surprise," said Farrar. "There were no precedents for guidance. Trial counsel presented his argument for a mistrial in three parts that blurred and overlapped which may have resulted in confusion."

The Appeal Court also dismissed arguments that police were passive recipients of Webb's information.

"The police did not passively receive information; they successfully encouraged Webb to help them in their investigations and ensured their collaboration remained secret," Farrar said.

In asking for a new trial Smith appealed on four grounds.

They included whether the trial judge erred in failing to declare a mistrial, in finding that a search of Sandeson's apartment did not violate his charter rights and in ruling that Sandeson's charter rights were not violated in two police interviews. Smith also questioned whether the conviction for first-degree murder was reasonable.

However, Farrar said the Appeal Court felt it would be "unwise" to deal with the final three points.

"The issues arising under these three grounds of appeal will likely be the subject of evidence and argument at the second trial," Farrar said.

This report by The Canadian Press was first published June 17, 2020.