Damian Derby was arrested at about 7:30 p.m. at his home in the 7600 block of Eigleberry Street, police said.
The incident occurred at about 4:05 a.m. Thursday when Derby allegedly entered the victim's home in the 100 block of W. Fifth Street through an open window normally used by household pets, according to police.
The suspect accosted the victim while she was in her bedroom, but she was able to move to the kitchen and arm herself with kitchen knives, police said.
The victim fended off the suspect and may have stabbed him before fleeing the home to try to find a nearby phone to call police. The suspect allegedly gave chase while talking about his intentions to rape the victim, according to police.
The woman eventually found a nearby phone and dialed 911, but was again confronted by the suspect before she could speak with operators, according to police, who say the suspect took control of her and pulled her into nearby shrubs.
An officer arrived shortly afterward and briefly struggled with the officer before fleeing the area and avoiding capture, police said.
Police released a sketch drawing of the suspect, which led to the investigation of numerous leads received from the public. However, it was subsequent interviews with the victim that led police to a possible suspect.
The victim ended up picking Derby out of a photographic line up early Friday evening.
He was arrested without incident at his home and faces charges of assault with intent to commit rape, assault with a deadly weapon, false imprisonment, burglary, stalking, and a parole violation, police said.
Anyone with additional information about the case is urged to contact Detective Mitch Madruga or Detective Jason Smith at (408) 846-0300.