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: Wildland Fire Burns 150 Acres Near Watsonville; Evacuations Ordered, Zero Containment

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: CHP Pursuit Ends With Crash, AC Transit Bus Into West Oakland Home

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: COVID: Bay Area Airports, Tourism Industry Gears Up As Rules Loosen For International Travelers

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