A Sonoma County man allegedly attacked two deputies trying to detain him outside a Guerneville trailer park and then attempted to flee by carjacking a passing motorist, authorities said Friday.

The incident occurred shortly before 4:30 p.m. Thursday when two deputies responded to reports of an agitated, pacing man talking to himself.

The deputies confronted Todd Franczak, 35, on Armstrong Woods Road, authorities said. One deputy tried to subdue Franczak with a Taser gun when he allegedly assaulted the officers, but it seemed to have no effect, authorities said.

Franczak fled down the road into the park, stopping traffic along the way and climbing into a car driven by a passing motorist, officials said.

When the driver refused to leave the area, Franczak allegedly grabbed the driver in a chokehold. Deputies apprehended him before he could do further harm.

Franczak was arrested on suspicion of several felony charges, including assault with a deadly weapon, assault on a peace officer, attempted carjacking, attempted kidnapping, obstructing a peace officer with violence and being under the influence of drugs.

Franczak was taken to a local hospital and was then booked into the Sonoma County Jail on $150,000 bail, the Sheriff's Office said.