HAYWARD -- A man suspected of violent rape was tracked down and arrested in part because he used a credit card he stole from his victim after stalking and assaulting her early Saturday, authorities said Wednesday.

Miguel Torres, 38, was arrested Wednesday evening at his home in Hayward. Alameda County Sheriff's investigators say Torres followed a 19-year-old college student as she drove home from a friend's house shortly after midnight Saturday, then attacked and raped her at her apartment complex in an unincorporated area of Hayward.

Sheriff's detectives using video footage of the suspect's car to survey local businesses were aided when Torres used the credit card he had taken along with the victim's purse to get his car washed and to purchase sexual enhancement pills from a convenience store, officials said.

Sheriff's detectives said the woman had left a friend's house in the area of Jackson Street and Harder Road and drove herself home. She had parked at her apartment complex and was getting her bag and other items from the trunk, officials said, when Torres rushed at her from behind, covered her mouth, and told her he had a gun and would kill her if she didn't cooperate.

He struck her on the head with his fist, knocking her to the ground, then climbed on top of her and raped her, investigators said. After the assault, officials said he took her bag and fled on foot to his car, which was parked outside the complex.

Investigators, initially frustrated by few clues to go on, began surveying businesses with surveillance cameras in the area. Eventually, they found several pictures of a white Ford Expedition that seemed to be following the victim's car as she drove down Mission Boulevard.

Tracing transactions on the victim's stolen credit card, detectives found that the man had used the card twice later Saturday. Investigators identified Torres as the suspect and arrested him Wednesday evening.

"Any time you have an atrocious crime like this, it takes a real team effort to capture the suspect so quickly," sheriff's Sgt. J.D. Nelson said. "Our special victims unit worked day and night to put this violent predator back where he belongs."

Torres had previously served 11 years in San Quentin State Prison on an attempted murder charge out of Santa Clara County and was charged with attempted murder of a fellow inmate while he was incarcerated, officials said. He was paroled in 2010.

He was being held Wednesday on suspicion of sexual assault, rape and robbery.

Follow Kristin J. Bender at Twitter.com/kjbender.