Wielding a hammer, a 20-year-old man struck and seriously injured a Petaluma co-worker and then fled to Humboldt County where he was arrested, a Sonoma County sheriff's official said Wednesday.

Deputies Wednesday returned suspect Juan Luis Ayala, 20, to Sonoma County and booked him into the jail. Ayala is suspected of attempted homicide and car theft, said sheriff's Sgt. Shannon McAlvain.

Sheriff's deputies responded to the reported hammer attack at around 11 a.m. Tuesday at a Petaluma chicken ranch on Bailey Avenue. The victim, who remained hospitalized Wednesday, was reportedly repairing chicken coops at the time of the attack.

McAlvain said it appeared the man had been struck in the face and knocked unconscious. The man later told Sheriff's deputies he had no idea why Ayala attacked him. Detectives Wednesday night were still questioning Ayala about the attack and trying to determine a motive, McAlvain said.

Ayala had fled on foot after two other ranch workers tried unsuccessfully to stop him. Deputies later determined he'd stolen a black Toyota Echo from Pine Lane, less than 1/3-mile away, the sergeant said.

Late Tuesday night, sheriff's officials learned the man had been arrested in Humboldt County on suspicion of the Sonoma County crimes.

A Weott resident had called deputies, saying Ayala had arrived at her home and was unwelcome.

She alerted deputies to his suspected connection to the hammer attack. Humboldt County sheriff's officials confirmed the information and deputies and CHP officers went to the home at about 9:30 p.m.

Ayala was arrested without incident and booked into the Humboldt County Jail in lieu of $500,000 bail, Humboldt officials said.

CHP officers found the stolen car parked at a high school in the community of Miranda.

McAlvain declined to identify the victim, saying the case remained under investigation.