A man was sentenced this week to 14 years in state prison for trying to rape a 17-year-old girl who was walking home from school in Palmdale.

Marlon Onshawtae Crowell, 36, of Palmdale, was sentenced immediately after pleading no contest to attempted forcible rape, according to Deputwy District Attorney Stephen Morgan.

Superior Court Judge Lisa Chung also ordered Crowell to register as a sex offender for the rest of his life.

Crowell had been awaiting a retrial after jurors deadlocked 9-3 in favor of guilt last November on one count each of attempted rape and assault with intent to commit rape.

Crowell blocked the girl’s path as she walked in the 38000 block of Sierra Highway at midday on Sept. 6, 2012, scared her by asking inappropriate questions and grabbed her by her blouse and tore it open after she tried several times to get away, authorities said.

The girl hit Crowell with her hands, threw her backpack to the ground and ran to a nearby parking lot where she met a good Samaritan who drove her home, authorities said.