Chilling surveillance video shows a UC Berkeley student racing through a locked gate as a homeless man allegedly chased her home, only to watch him scale the barrier, enter her apartment complex and remain free while prosecutors decide whether to charge him.

The frightening Sept. 15 encounter was captured on security video outside the apartment building in Berkeley, California.

The video shows the woman entering the secured complex around 8 p.m. Seconds later, a man climbs over the locked gate and allegedly follows her inside while holding an object initially reported as a knife.

The Berkeley Police Department said it received the woman’s call at approximately 8:04 p.m. Patrol officers were handling other high-priority emergencies at the time, including a domestic violence case and a report involving a missing person considered at risk.

Eden told ABC7 that officers arrived about an hour later but were unable to locate the man.

The next night, at approximately 9:24 p.m., police received another call reporting that the same man was lying on a sidewalk near Berkeley Way and Walnut Street.

Officers responded, detained and identified him, according to the department. Police confirmed that he was the person involved in the previous night’s alleged trespassing but did not arrest him.

The department said California law generally prevents officers from making a warrantless arrest for a misdemeanor that did not occur in their presence. Because the alleged trespassing had happened the day before, officers said they could not arrest the man based solely on that offense.

Instead, investigators submitted the case to the Alameda County District Attorney’s Office for review. Prosecutors will determine whether criminal charges should be filed.

ABC7 reported that the district attorney’s office confirmed it was reviewing the case and that no charges had been filed as of Monday.

Eden said she was stunned a man could allegedly chase her into a secured building and still walk away after police identified him. She called for stronger laws and greater protections for residents, according to the outlet.

UC Berkeley and the Alameda County District Attorney’s Office did not immediately respond to Fox News Digital’s request for comment.