The Supreme Court of Canada has ordered a new trial for an Edmonton man accused of sexually assaulting a woman in a so-called "friends with benefits" case.

Patrick Goldfinch was charged with sexually assaulting a woman he had previously dated and lived with.

After splitting up, they remained friends, and the woman would sometimes visit his house and stay overnight.

In a 6-1 decision delivered today, the top court ruled evidence that they were "friends with benefits" should not have been heard by the jury.

Calling it a "reversible error of law," the majority of justices found that admitting the evidence served no purpose other than to "support the inference that because the complainant had consented in the past, she was more likely to have consented on the night in question."

"The improper admission of the evidence for the broad purpose of providing 'context' led to a significant and highly prejudicial broadening of the sexual activity evidence at trial, which might reasonably have had a material bearing on the accused's acquittal," the judgment reads.

At trial, Goldfinch's defence requested a voir dire — a preliminary hearing to determine if evidence can be admitted that is not heard by the jury — to determine whether the evidence about the sexual relationship at the time of the alleged assault was admissible under Section 276 of the Criminal Code, commonly known as Canada's rape-shield law.

Goldfinch had argued that the sexual nature of the relationship provided important context, and that without it, the jury would be under the false impression that he and the complainant were in a platonic relationship.

According to documents filed with the Supreme Court, the complainant said that on May 29, 2014, Goldfinch dragged her by her hair into the bedroom, hit her in the face with significant force and had sexual intercourse with her without her consent.

Goldfinch acknowledged that sexual intercourse had occurred that night, but testified that the complainant was an active and consenting participant.

The jury acquitted Goldfinch, but that verdict was overturned by an appeal court.

Dissenting opinion

In a dissenting opinion, Justice Russell Brown said the trial judge was right to allow the evidence.

In his written reasons, he said admitting evidence of the relationship would be no different than admitting evidence that an accused and a complainant were married, dating or boyfriend-girlfriend.

"The point being, the trial judge believed the jury ought to be told how they knew each other in order to avoid misinterpreting things the appellant said or did as having arisen out of the blue," he wrote. "As she viewed the matter, keeping the existence of the relationship from the jury would leave a level of artificiality in the appellant's evidence, and would prevent him from being able to make full answer and defence."

In a statement to CBC News, Alberta Crown prosecutor Joanne Dartana said the Supreme Court in its decision notes that the majority of reported sexual assaults occur between people who know each other and are in some kind of relationship.

"The decision reaffirms the principle that stereotypical reasoning regarding sexual assault victims has no place in a criminal trial and this principle is no less important where the accused and the complainant had a pre-existing relationship," she said.