REDWOOD CITY -- A man was sentenced to 12 years to life behind bars Tuesday for beating and trying to rape a woman as she studied for school exams in a Redwood City motel room, attorneys said.

Maurice Banks, 47, must serve 85 percent of the 12-year sentence before he can be considered for parole. A San Mateo County Superior Court jury deliberated 40 minutes before convicting him in August of the December 2010 attack, District Attorney Steve Wagstaffe said.

Prosecutors said Banks, a transient, busted into the woman's room at the Garden Motel on Broadway and choked her unconscious before pulling her pants down. She was also beaten badly enough to break bones in her face.

When the woman woke up she recalled the attacker ordering her to perform oral sex, but when he looked away for a moment she "sprinted" from the room, prosecutors said.

The woman had checked into the motel in search of a quiet place to study for finals.

Banks wrote an apology to the victim, but at her request, he wasn't permitted to address her in court or give her the letter, said defense attorney Jeff Hayden.

"I pray constantly for the victim and I hope that some day I gain forgiveness for the pain and suffering I have inflicted," Banks wrote in the letter.

Banks has said he has no memory of the attack because he was on an crack and alcohol binge that left him blacked out.

Contact Joshua Melvin at 650-348-4335. Follow him at Twitter.com/melvinreport.