A defense attorney tried using sexsomnia to get his client off the hook for raping an unconscious 17-year-old girl.

Sexsomnia is also known as sleep sex.

Stanford researchers have studied the phenomenon, describing it in 2002 as, "a treatable medical condition which causes people to commit violent sexual acts in their sleep."

The press release was from the Yolo County District Attorney's office. It said a 24-year-old man named Najee A've was convicted this week of two felonies related to raping a 17-year-old girl in Aug. 2013: rape of an unconscious person and sexual penetration by foreign object of person under 18 years of age.

A Sacramento State student living in Davis at the time, A've got drunk one night, came home and found a roommate's friend asleep on a couch, where he raped her.

Follow WFMY News 2 on Facebook and Twitter

"The 17-year-old woke up shocked to find A’Ve raping her. She was eventually able to squirm away," the release states. "Eventually, A’Ve went to sleep and the 17-year-old escaped to her friend’s room who got her out of the apartment and to the safety of her family where the police were called. A DNA sample was collected from the victim and analysis showed a DNA match for A’Ve."

According to the Yolo Co. DA, A've claimed he remembered getting drunk but nothing about what he did after that.

"The defense put on a doctor who testified that A’Ve was likely suffering from 'sexsomnia' which is a type of sleep walking state in which the person engages in sex while asleep," according to the release. "The doctor admitted that this would have been brought on in part by the alcohol."

Chief deputy district attorney Jonathan Raven said that's the first time he's never seen an attorney try to use sexsomnia as defense.

"Voluntary intoxication is not a defense," Raven said. "You don't get to get drunk and then have sex with someone who doesn't want to have sex with you and then use the fact that you were inebriated as an excuse."

He called the claim "creative."

"Kind of poppycock, I would say, and the judge saw through it and he made the right decision," Raven said.

ABC10 also reached out to WEAVE Inc., an organization that provides victim advocate services for Sacramento County. WEAVE was not involved in this particular case, since it happened in Yolo County.

WEAVE CEO Beth Hassett described how difficult it is for a victim to go through the process of pressing charges against her attacker.

"It is really traumatizing for a victim to have to repeatedly tell her story, to sit there in front of a judge, in front of the person who assaulted her, and continue to tell that story over and over again," Hassett said. "That's an extremely brave thing for somebody to do."

► Make it easy to keep up to date with more stories like this. Download the WFMY News 2 App now

Since the victim in this case was affiliated with UC Davis, the college's Center for Advocacy, Resources & Education (CARE) offered victim services to her.

CARE director Sarah Meredith said much is being done on UC Davis campus to prevent sexual violence.

"Just like every campus in the United States right now, we're providing mandatory eduation for all of our incoming students," Meredith explained. "Those in-person programs are done. We cover a variety of topics: things like the definition of sexual assault, consent, an overview of domestic violence, dating violence, stalking, bystander intervention, reporting options, confidential resources."

A've is in Yolo County's jail now, awaiting sentencing next month. He could face up to nearly nine years in prison, not for some flimsy excuse called sexsomnia but for raping an unconscious woman while he was drunk.

The Yolo County DA's office hopes this sends a message that sexual assault is a serious crime and will be prosecuted as such.