LOS ANGELES -- A gunman believed to have shot a Central California sheriff's deputy and targeted others in a series of attacks was shot dead Thursday after confrontations that wounded three other law enforcement members, authorities said.
Mason James Lira, 26, was killed after he emerged from a brushy riverbed in Paso Robles, climbed a steep hillside and ran toward a vineyard, authorities said.
He had two stolen handguns and investigators found a box of ammunition, Paso Robles Police Chief Ty Lewis said.
He clearly had been planning attacks on law enforcement, possibly for days, the chief said.
Over the course of about 36 hours, Lira opened fire in an ambush and managed to evade hundreds of law enforcement officers, authorities said.
"Every time that law enforcement got near to him, he engaged them in gunfire," Lewis said at an evening news conference.
The manhunt for Lira began at dawn Wednesday, when authorities said he opened fire on the Paso Robles police station. Two sheriff's deputies heard gunshots and responded but didn't see the attacker until they were outside their patrol car and under fire.
Deputy Nicholas Dreyfus, 28, was hit in the face. His partner fired back and dragged Dreyfus behind a police car. Dreyfus, who was able to radio that he'd been shot, underwent surgery Thursday and was in guarded condition.
While scores of officers searched for Lira, they received a report of a body near a train station and found a 58-year-old man shot to death on the tracks. He appeared to be a transient who was camping out overnight. Police believe Lira was responsible for the killing.
Lira's father told The Associated Press he thinks the shooting at the police station might have been a suicide attempt.
Jose Lira said his son had been diagnosed with schizophrenia, Asperger's syndrome and attention deficit hyperactivity disorder. He said his son has been in and out of jail and treatment centers, didn't take his medication and often thinks he is a special agent or a soldier.
"He lives in a fantasy world," Jose Lira said. "He doesn't have a beef with the police."
Wednesday night, Paso Robles police got a report of shots being fired and spotted a man who appeared to be Lira but he fled into a nearby apartment complex, Lewis said.
Officers surrounded the complex but Lira managed to escape through a long, overgrown riverbed. At one point, he was spotted and shot at officers before retreating back to the riverbed, authorities said.
Overnight, police, San Luis Obispo County sheriff's deputies, an FBI SWAT team and other law enforcement surrounded an area of the riverbed where Lira was believed to be hiding and they planned to begin a systematic search Thursday, Sheriff Ian Parkinson said.
"We knew we had to search a very large area with a very dangerous person" and they didn't want him escaping into nearby neighborhoods, he said.
But shortly after 2 p.m., Lira came out of hiding and fired at surrounding officers. An Arroyo Grande police sergeant took a bullet through his calf, Parkinson said.
Two hours later, he emerged again, crawled up an embankment and up a short but steep hill and began to run to a neighboring vineyard, the sheriff said.
He was shot. During the shooting, Parkinson said a California Highway Patrol officer took a bullet to his protective vest and a Kings County sheriff's deputy who got out of an armored vehicle to rescue him was shot above the knee, Parkinson said.
All three wounded officers were expected to recover, he said.
Two handguns and a box of ammunition were found, Parkinson said, adding that the guns apparently were stolen during a commercial burglary on Tuesday.
The guns were linked to the death of the transient and shooting of the sheriff's deputy in Paso Robles, the police chief said.
Also found was a box of ammunition, with more in a crawlspace under a Paso Robles movie theater that was reached by a storm drain, Lewis said.
Lira may have been living in town for days before the attack, he said, and was seen at several places in the days before the first shooting.
Lira had been arrested in the Monterey area last month on suspicion of making criminal threats and resisting arrest but was released on June 3 after serving jail time, Parkinson said.
Parkinson said investigators were still trying to determine a specific motive for what he called planned and "cowardly" attacks.
"He did want to shoot law enforcement," he said.