The victim, an 18-year-old Cabrillo College student, was walking in the 7800 block of Soquel Drive near Heather Terrace at about 6:30 p.m. when a man approached her.
The two talked for a few minutes before the man grabbed the victim and started touching her in a sexual way, Liberty said.
The woman was able to fight him off and stop the assault. She called for help on her cell phone and her attacker fled.
The woman did not suffer any injuries.
A deputy assigned to patrol the campus caught up with the suspect, later identified as 33-year-old Niel Ashley Jr., as he walked through the campus on Soquel Drive, Liberty said.
The deputy detained Ashley, and he was booked into Santa Cruz County Jail on an attempted rape charge after the victim identified him as her attacker.
No other sexual assaults have been associated with the campus this year, Liberty said.
This incident is still under investigation.
Anyone with more information about the crime is encouraged to call Sgt. Paul Ramos at (831) 479-6551.