HALIFAX -- Nova Scotia's highest court has ordered a new trial for a taxi driver acquitted of sexually assaulting a highly intoxicated passenger, saying the trial judge erred in law by finding there was no evidence of lack of consent.

In a unanimous decision released Wednesday, the Nova Scotia Court of Appeal found the judge ignored or disregarded circumstantial evidence that would have allowed him to infer the complainant did not voluntarily agree to engage in sexual activity, or that she lacked the capacity to do so.

Under the law, the Crown was obligated to prove the complainant was not capable of understanding the nature of what was happening to her.

The woman, who was found unconscious in Bassam Al-Rawi's cab early on May 22, 2015, told police she couldn't remember what happened.

During Al-Rawi's trial, an expert testified that the young woman had consumed five draught beers, two tequila shots and one vodka-cranberry drink while at a downtown bar. The forensic analyst determined the woman's blood-alcohol level was three times the legal limit.

Text messages sent by the woman after she left the bar were riddled with mistakes and were, at times, largely incoherent, court heard. In response to a friend who asked if she was OK, the woman texted: "No. I am not got."

At the conclusion of Al-Rawi's trial, Lenehan said he accepted evidence that the woman had urinated in her pants before the cab driver removed them from her while she was in the back seat.

Court heard that when a police officer spotted the woman in the cab at 1:20 a.m., she was lying unconscious, naked from the waist down with her tank top pushed up and her legs propped up on the two front seats.

The vehicle was found in a neighbourhood far from the woman's home, only 11 minutes after she got in the taxi shortly after 1 a.m.

A constable testified that the driver was seen shoving the woman's pants and underwear between the front seats, As well, his pants were undone around his waist and his zipper was down.

In an oral ruling delivered last March, provincial court Judge Gregory Lenehan said there was no evidence of a lack of consent or a lack of capacity to consent.

Lenehan's decision -- now the subject of an independent review -- sparked public outrage. In particular, the judge faced sharp criticism for saying: "Clearly, a drunk can consent."

The appeal court found Lenehan's statement was correct in law, but the three justices concluded his application of the consent test revealed a legal error when he equated incapacity only with unconsciousness.

During an appeal court hearing in November, Crown lawyer Jennifer MacLellan said Lenehan's decision never dealt with the possibility the woman may have been incapable of consenting to sex prior to passing out.

Wednesday's ruling included a concurring opinion from one member of the three-judge panel, Justice Jamie Saunders.

He offered a defence of the original ruling's language, saying the trial judge was "simply stating the law" when he observed that a drunk can consent, even if the words he chose were harsh. but Saunders agreed that Lenehan erred in failing to consider to what extent the complainant's level of intoxication affected her capacity to consent.

"Anyone who took the time to read the whole of the judge's reasons in this case would recognize how he agonized over the outcome, and rendered what was obviously a very reluctant acquittal," Saunders said.

"One hopes that the outcry which greeted the release of the judge's decision in this case will not cause him or his judicial colleagues to be cowed in the way they decide the matters that come before them, and that they will continue to judge with the courage, independence and impartiality, their oath and our law demand."