For more than a week, dozens of Kern County law enforcement officers scoured the wilderness near Lake Isabella looking for a gunman who killed one man and wounded two sheriff's deputies in separate incidents.
They described Benjamin Peter Ashley, 34, as a homeless man with an extensive criminal background. Local schools were closed and residents were told to stay inside and lock their doors.
On Saturday, two deputies confronted Ashley about 5:30 p.m. near a mini-mart on U.S. 395 after receiving a tip from the sister of the store's clerk, who recognized Ashley's distinctive green eyes, Sheriff Donny Youngblood said.
The deputies ordered Ashley to show his hands.
Ashley then pulled a 9-millimeter handgun from his waistband and the deputies opened fire, Youngblood said. The deputies believe Ashley may have shot himself once in the head after falling to the ground in a seated position, the sheriff added.
"It all happened so quickly," he said.
The two deputies do not believe that Ashley fired any rounds at them, according to the sheriff. In addition to the handgun pulled from his waistband, three more handguns were found on Ashley's body after a search, he said.
Ashley was wanted in connection with a series of violent crimes in the area, beginning with a July 28 incident in the Twin Oaks area in which a gunman held three men captive in a cabin where he was believed to have been squatting.
The search intensified two days later when David Markiewitz, 64, was found dead in another cabin in Jawbone Canyon, about 10 miles away.
On Aug. 1, two SWAT team members were shot and wounded by a man as they searched for Ashley in a mobile home in Kelso Valley. One deputy was shot in both arms, the other was grazed.
During the manhunt, authorities warned residents to stay inside, and closed two elementary schools and a middle school. They also closed a stretch of the famed Pacific Crest Trail in the southern Sierra Nevada.
Authorities described Ashley as a survivalist who would be able to find food and water to sustain himself.
"He has been able to stay one step ahead of us," sheriff's spokesman Ray Pruitt said at the time.
Ashley had several previous encounters with police. He was charged with resisting arrest in Orange County in 2012 and in Glendale in 2013, according to court records. He also had been arrested in San Diego and San Marcos.
In 2014, Ashley was arrested in Bear Valley Springs on a fugitive warrant connected to the Glendale incident after police received a report of a suspicious person inside the gated community, police Chief Jeff Kermode said.
Officers found Ashley about two miles away, Kermode said. He was arrested and booked into a Kern County jail but never appeared in court for the Glendale case.
Times staff writer Veronica Rocha contributed to this report.