OAKLAND (CBS SF) — A 25-year-old man was sentenced Friday to eight years in state prison for raping a college-age woman who was unconscious from drinking alcohol, in an apartment near the University of California at Berkeley campus two years ago.

Donald Harry was convicted last June of raping an intoxicated person and two counts each of oral copulation and sexual penetration of an intoxicated person. The assault occurred in an apartment building in the 1700 block of Oxford Street in the early morning hours of May 14, 2017, during graduation weekend.

READ MORE: 49ers Win Wild Card 23-17 as Time Runs Out for Cowboys in Frantic Finish

Alameda County prosecutor Nick Homer admitted in his closing argument in the trial that the woman, who was 20 at the time, drank heavily at a fraternity party but told jurors, “You don’t judge her for that.”

Homer said the woman made sure she didn’t drive, was somewhere safe and “did everything right.”

But he said an unexpected thing happened, which is that she was locked out of her apartment.

A group of three people, which included a male neighbor, his girlfriend and Harry, who was visiting from Southern California, approached her and said she could sleep at the neighbor’s apartment, according to Homer.

“She had no idea what she was getting into, the dynamics, the relationships,” Homer said.

The prosecutor said Harry and the two others could have called police or the contacts on her cell phone but they gave her drugs, which made her even more intoxicated.

Homer said the woman was unconscious and Harry “did whatever he wanted” and had sex with her without discussing it with her.

READ MORE: 1 Killed, 2 Injured in Sonoma County Crash on Route 116

Homer told jurors there is no reason to doubt the woman’s testimony that she was too intoxicated to consent to having sex “because she’s credible and her story has been consistent and she has no bias against the defendant (Harry).”

Harry’s trial lawyer Elliot Silver said “it’s undisputed” that the woman was moaning with pleasure when she was having sex with Harry because a neighbor testified that her moans were so loud that she had to turn on “Bill Nye the Science Guy” to drown out the noise.

Silver alleged that the woman had a strong motive to lie because her boyfriend knew what happened and might have broken off their relationship if she hadn’t claimed to have been raped.

After Harry was convicted he fired Silver and hired veteran defense attorney Darryl Stallworth, who filed a motion seeking a new trial on the ground that Silver had provided ineffective assistance of counsel.

Stallworth alleged in his motion that Silver failed to call additional witnesses who could have cast doubt on the woman’s credibility.

Stallworth wrote that there were “inconsistencies” in her testimony and her statements to police and alleged that her testimony that she was too intoxicated to consent and blacked out during sex “is at odds with her ability to recall the order of events.”

However, Alameda County Superior Court Judge Thomas Rogers denied the motion for a new trial.

Rogers could have sentenced Harry to up to 40 years in prison but only sentenced him to eight years.

MORE NEWS: French Bulldog Stolen at Gunpoint During Castro Valley Armed Robbery

Stallworth said after the hearing that the eight-year term “is fair” given the charges for which Harry was convicted.