A Calgary man who was retried in a sexual assault case — after initially being acquitted by a judge who asked the alleged rape victim why she didn't just keep her knees together — was acquitted again on Tuesday.

Alexander Scott Wagar, 29, was accused of raping a 19-year-old woman at a party, but was acquitted in the first trial in 2014 by Justice Robin Camp, who was a provincial court judge at the time but was later promoted to the Federal Court.

The acquittal was overturned and a new trial was ordered after the Alberta Court of Appeal reviewed transcripts of the trial, exposing the inappropriate comments and questions made by the South Africa-educated judge.

The second trial for Wagar, 29, ended in November 2016 and a second judge delivered a second acquittal Tuesday.

Court heard that Wagar met a woman, JM, at a party in 2011 and the pair ended up in a bathroom together.

Wagar testified they had consensual sex, while JM — who is known publicly only by those initials because her identity is under a publication ban — told the judge she was raped on a bathroom sink.

JM testified she was raped by Wagar at a party. Her name is under a publication ban. (Meghan Grant/CBC)

Lethbridge Assistant Chief Judge Jerry LeGrandeur presided over the provincial court trial in Calgary, likely to avoid any conflict for Calgary-based judges who would have worked with Camp.

LeGrandeur made a point of noting evidence from the first trial was not a factor in his decision.

The judge said both Wagar and JM had "credibility issues" but noted several inconsistencies, in particular, in her testimony, including how she went back and forth on whether she had been drinking for days leading up to the party.

Wagar, with a furrowed brow, rested his head on a closed fist, sometimes nodding and sometimes shaking his head as the judge read out his reasoning in a lengthy preamble before delivering the decision.

As he exited the courtroom, Wagar shouted in celebration: "Yeah!"

Wagar the 'true victim,' defence says

Wagar's lawyer, Pat Flynn, said his client suffered "tremendously" during the two trials.

"He is the true victim, as far as I'm concerned," Flynn told reporters. "He's been in custody now for over two years, twice waiting for trial on this matter."

Flynn said Wagar's mother passed away last month and that Wagar was unable to see her before she died.

He said he's pleased with LeGrandeur's decision.

"I think this reminds us that there are innocent people who are charged with sexual assault, and we must remind ourselves that they have that right of presumption of innocence," Flynn said.

'Cooling effect' feared

Prosecutor Janice Walsh said the Crown may consider an appeal.

"Some of the judge's comments certainly give pause for future cases of sexual assault," she said.

Walsh said she fears the decision will have a "cooling effect" on other complainants coming forward.

"We still have some work to do to determine whether or not this is the end of our story, and we're going to do that work," Walsh said.

Camp's acquittal overturned

During the retrial, court heard evidence from Lindsay Winter, a front-line worker at the Mustard Seed shelter where JM sometimes slept.

Winter testified JM called her in tears the night of the alleged attack and said she'd been sexually assaulted.

The next morning, JM showed up at the shelter and Winter said she was able to convince the teen to report the incident to police.

Wagar told court he believes JM is accusing him of rape because his brother called her a "slut" and because she saw the accused cuddling with another woman right after he and JM had sex.

Camp fighting to keep job

During the first trial in 2014, Camp asked JM several times throughout the trial why she hadn't done more to prevent the attack.

At the first trial, the woman who said she was raped was asked by then provincial court Judge Robin Camp why she didn't prevent the attack by keeping her knees together. (Trial transcript)

Camp asked JM: "Why couldn't you just keep your knees together?"

Camp also implied the complainant could have prevented the attack by "sinking her bottom down into the [sink] basin."

A five-member inquiry panel recommended that Federal Court Justice Robin Camp be removed from the bench over comments he made during a 2014 sexual assault trial when he was an Alberta provincial court judge. (Jeff McIntosh/Canadian Press)

Camp's comments and subsequent complaints made with the Canadian Judicial Council led to an inquiry that took place in September.

Camp admitted to several mistakes during the trial and told the inquiry he was "very sorry" for the "hurtful" comments he made to the complainant.

However, a panel of five Superior Court judges and senior lawyers unanimously recommended Camp lose his job.

Most recently, Camp's lawyer has asked he be allowed to plead his case in person to the Canadian Judicial Council.

Flynn called Camp's comments in the initial trial "unfortunate."

"I don't want to be flippant on this, but would you rather have your judge make the right decision, and say something inappropriate, or to be politically correct and get the wrong decision?" he said.

Since it was created in 1971, the Canadian Judicial Council has only recommended two other judges be removed.

The judges in both cases resigned before the recommendations made it to Parliament, which ultimately decides whether or not to dismiss a Canadian judge.