MARTINEZ (CBS SF) – A man is in critical condition following a struggle with officers in Martinez Wednesday morning, police said.

Police responded to the Martinez Marina at around 10:15 a.m. on reports that a man had locked himself in a city worker’s vehicle and another from employees of the Union Pacific Railroad that someone was chasing a train on the tracks near the marina.

READ MORE: UPDATE: Air Attack, Calming Winds Aid Firefighters Battling Wildfire Near Big Sur; Containment Grows To 25 Percent

Responding officers found the suspect, a 28-year-old man, inside the city vehicle.

The suspect resisted arrest and an officer used a Taser to subdue the man, police said.

READ MORE: Deadly Hit-And Run Marks Sixth Pedestrian Fatality in San Jose in 3 Weeks

The man continued to resist arrest and ran away. He was detained after a brief chase, according to police.

The suspect showed signs of cardiac arrest while in custody and he was taken to a hospital in critical condition.

An investigation revealed that the man had been seen at Contra Costa Regional Medical Center earlier that day. He reportedly left the hospital and went to the marina where he attacked a city worker before officers arrived, police said.

MORE NEWS: Female Employee Beaten During Friday-Evening Robbery of Santa Rosa Pharmacy

(Copyright 2011 by CBS San Francisco. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)