SANTA CRUZ (KRON) — A registered sex offender was arrested near Santa Cruz High School on Tuesday, according to the Santa Cruz Police Department.

Just after 12:30 p.m., campus staff noticed a transient man walking into the school gym, police said.

Campus security was immediately notified and was able to stop the man before he made any contact with students, according to Santa Cruz Police.

The transient left the school but was followed by a campus supervisor until police caught up with him about a block away from the school, police said.

Police identified the transient as 25 year-old Daniel VanDoren of Berkeley, a registered sex offender with two felony warrants in Nevada County.

VanDoren was arrested without further incident.