The suspect, 26-year-old Mason Lira, was stopped in Templeton, south of Paso Robles, where investigators said he shot a deputy in the head Wednesday.
The District Attorney of San Luis Obispo County tweeted that four law enforcement officers had been shot. A spokesman for the sheriff later said Lira was in custody.
The capped off a manhunt that had stretched over 24 hours, involving hundreds of police officers. Officials closed parts of a freeway and used flash-bangs while searching apartments.
Tony Cipolla, the spokesman for the San Luis Obispo County sheriff, described the search as "a wide-ranging, full-on, full-scale effort."
The suspect's father, Jose Lira, told The Associated Press that his son had mental illnesses and refused to take medication but had no particular animus toward law enforcement. He said his son often thought he was a special agent or a solider and may have believed he was under attack or in a war zone.
Law enforcement personnel from several jurisdictions patrolling downtown Paso Robles, Calif., on Wednesday. (The Tribune of San Luis Obispo via AP)
Although authorities have described the attack on the Paso Robles police station as an ambush, his father thinks it might have been a suicide attempt.
Jose Lira said he last spoke to his son about two months ago, when he was threatened by him and became belligerent.
"I slept with a gun loaded under my pillow last night," he said. "I'm afraid of him, too."
Jose Lira said his son has been homeless since he was 17, in and out of jails and mental health facilities.
"He doesn't trust anybody, he's always by himself," he said.
Jose Lira first spoke to The Visalia Times-Delta.
A gas station clerk reported seeing Lira around 2 a.m. Thursday when he came in to buy an energy drink, the TV station KSBY reported. The clerk said Lira was sweaty, exhausted and mumbling to himself but did not do anything threatening.
This still image taken from a surveillance camera and provided by the San Luis Obispo County Sheriff’s Office seeking the public’s assistance in finding a suspect believed to be responsible for a shooting that took place in Paso Robles in the morning on Wednesday, June 10, 2020. (San Luis Obispo County Sheriff’s Office via AP)
The events started unfolding around before dawn Wednesday, when Lira allegedly fired at police cars as they entered downtown Paso Robles.
Two sheriff's deputies heard gunshots but didn't see the attacker until they were outside their patrol car and gunfire targeted them. One was hit in the head. His partner fired back and dragged the deputy behind a police car. The wounded deputy, Nicholas Dreyfus, 28, had a good prognosis Thursday after surgery.
While 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. It wasn't immediately clear when he was shot.
The attack came just five days after law enforcement officers were ambushed farther north in the community of Ben Lomond. There is no indication the shootings are related.
Santa Cruz County sheriff's Sgt. Damon Gutzwiller, 38, was killed and another deputy injured Saturday in an attack by an Air Force sergeant armed with homemade bombs, an AR-15 rifle and other weapons, authorities said. Sheriff Jim Hart said the suspect, Steven Carrillo, was intent on killing officers.
Carrillo, 32, was arrested and the FBI is investigating whether he has links to the killing of a federal security officer outside the U.S. courthouse in Oakland during a protest against police brutality on May 29. A white van was spotted at both attacks.
In Paso Robles, there were no events that could have triggered the violence, San Luis Obispo County Sheriff Ian Parkinson said. Investigators didn't know if the attack was connected to anger over the killing of George Floyd by Minneapolis officers, he said.
Jose Lira said he doubts his son has any connection to the Santa Cruz and Oakland killings since he prefers to be alone.
"He lives in a fantasy world," Jose said. "He doesn't have a beef with the police."
The Associated Press contributed to this report.