A Brockville judge threw out a controversial defense today against a man convicted of sexual assault.

38-year-old Ryan Hartman testified he was sleeping when he raped a woman at a house party 7 years ago the judge rejected the defense.

For the victim at the centre of this case, today brought long awaited justice. She never believed her attacker suffered from sexsomnia. And now a judge has agreed.

Her identity is under a publication ban but there is no hiding her relief at the ruling today

“It's amazing, it's incredible,” the woman said outside court today, “I'm shaking, I’m crying.  It's overwhelming; just such a relief really that I finally some justice.”

The woman who is now 30 has faced her attacker 3 times in court. First when Ryan Hartman was convicted of sexually assaulting her at a house party near Brockville in 2011 as she lay sleeping in an air mattress beside her boyfriend. Then again when he appealed that conviction based on the sexsomnia defense.

“He was awake when he did it,” she says, “and there was enough evidence to prove that and I knew there was because I heard the evidence.”

In her 60 page ruling justice Kimberley Moore said:

"I find that he was awake and aware of his actions when he penetrated” the victim.

And, she added, while he may not remember some aspects of the assault

“this is far more likely to be the cause of an alcoholic blackout than any other reason".

One of Hartman's key witnesses in the appeal was Dr. Colin Shapiro, a psychiatrist with an expertise in sleep who coined the phrase "sexsomnia".

Court heard that Dr. Shapiro had conducted a sleep test with Hartman in which he says Hartman experienced a brief episode of sexsomnia lasting about 5 seconds. The judge said she watched that video but “contrary to what Dr. Shaprio testied to in this Court,” she said, “that brief parasomnia, and quite likely a sexsomnia, was nothing like the event that (the victim) described to the Court.”

She further rejected Shapiro's evidence as biased and at time inaccurate.  She said she accepted Hartman’s mother’s evidence that her son used to sleepwalk and rock himself to sleep when he was in grade school.

“However, I find that the only reliable evidence of sexsomnia that has been demonstrated is the possible touching of Mr. Hartman’s genitals during the sleep test on March 7, 2017.  The remainder of the evidence,” she added, “I find to be suspect.”

Sexsomnia has been used as a Defense in sexual assault cases a dozen times in Canada. In less than half those cases, the accused has been found not criminally responsible.

But not this time.

‘‘The emotions I have now, it was worth the fight,” says the woman, “I'm a stronger person now.  I'm a better person and I’m a role model.”

With Hartman's defense now thrown out, he will be back in court November 30 for the start of his sentencing hearing on his the sexual assault conviction.