Police have arrested a man with a history of sexual offenses after he was stabbed with a piece of jagged glass by a woman defending herself from an attempted rape during a home invasion.

James Powe, 36, was arrested for allegedly breaking into a woman’s home on Farnell Drive in Mobile. Police said they received a call about the home invasion around 3 a.m. Sunday morning.

Based on her statements to police, the victim — identified only as a 22-year-old female — said she woke up in the middle of the night to find Powe, a stranger, standing in her bedroom.

He said he was armed and would hurt her if she didn’t do as he said.

When the victim refused to remove her clothing, police say Powe attacked her physically, though she was “able to free herself after her shoulder broke a bedroom window.”

According to her statements to police, the victim then used a piece of broken glass from that same window to stab Powe multiple times in the head.

While the victim was hospitalized for injuries to her hand and shoulder sustained during the attack, those were not life threatening.

James Powe, 36, was arrested after attempting a rape a woman in Mobile who fought him off with a piece of jagged glass. (Mobile Metro Jail)

Powe was also treated at a local hospital for his stab wounds before being transported to the Mobile County Metro Jail this afternoon and charged with first degree attempted rape and burglary.

However, this was not Powe’s first attempted sexual crime. In 2001, he was convicted of rape in another case from Mobile — an incident that occurred just months after he’d been charged with indecent exposure.

He served time in state prison for that conviction, and after his release was charged with second-degree rape and robbery in November 2003.

Powe’s criminal history indicates several previous charges over the past two decades for things like robbery, burglary, receiving stolen property and writing bad checks.

He is also a registered sex offender in Conecuh County, and according to police, was in violation of the Sex Offender Registration and Notification Act (SORNA) at the time of Sunday’s attack on Farnell Drive.