SAN FRANCISCO (CBS SF) — A California Highway Patrol officer had his throat slashed by a homeless man near the entrance to the Bay Bridge Tuesday morning, but the fleeing suspect was arrested in San Francisco’s South of Market neighborhood.

The suspect, identified as 44-year-old Noel Corpuz, was booked into county jail for attempted murder, aggravated assault and resisting arrest.

Officers originally responded to a call of a pedestrian on the Essex on-ramp near the site of a homeless encampment at around 9:30 a.m.

A suspect was encountered at the scene and apparently stabbed the CHP officer following some sort of confrontation, according to CHP Cmdr. Christopher Sherry. A second CHP officer then chased the suspect but stopped and called paramedics when he saw his partner was down, the CHP said.

“Information was then broadcast at that time to alert units to set up a perimeter and have as many people as we can looking for the suspect,” said Sherry.

A San Francisco Police lieutenant told KPIX 5 the officer had his throat slashed.

The suspect, identified by authorities by his grey jacket and black backpack, was chased down 2nd Street and through South of Market with officers in pursuit.

“They were running east down Brannan then north up Fourth. They were running with their guns drawn, about 20 of them,” said witness Kemarn Bain.

The suspect was caught shortly after at a bank at the corner of of Fourth and Brannan streets.

San Francisco police said an officer initially attempted to arrest the suspect, but he attempted to take the officer’s holstered firearm. Officers were eventually able to take him into custody. A knife was found on the ground at the scene.

Tuesday morning excitement: suspect in CHP officer stabbing arrested outside my office. pic.twitter.com/bZ4ELBDwjz — Emily Seip (@emilymseip) February 2, 2016

The injured CHP officer was taken to San Francisco General Hospital with life-threatening injuries, but was expected to survive. According to doctors, the officer underwent four hours of surgery after the attack.

The officer was not identified, but he was described as a seven-year veteran of the CHP.

“This type of incident just really shocks us,” said Sherry, who spoke to reporters outside the hospital’s emergency room.

TM and © Copyright 2016 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2016 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. Bay City News Service contributed to this report.