A suspect was arrested Friday afternoon after two Northern California sheriff's deputies were killed during a series of shootings that spanned about six hours and 30 miles across two Northern California counties. A third deputy and a bystander were also shot during the spree.

Marcelo Marquez, 34, was taken alive Friday afternoon from a home in Auburn after the initial shooting hours earlier in a Sacramento commercial area, Placer County Sheriff's spokeswoman Dena Erwin said.

"This guy was on a one-man crime spree today. He has no idea of the damage he did," she said.

The four shootings sparked a massive manhunt by multiple agencies backed by search dogs, helicopters and armored vehicles. Residents nearby were told to stay indoors and schools were locked down during the search.

A woman who was with the suspect was also taken into custody in Placer County and authorities said she had a handgun in her purse.

Erwin said the officer who died was shot with an AR-15-type assault weapon, and the other officer was shot in the arm and was expected to survive.

Sacramento County Sheriff Scott Jones said at an afternoon news conference that Deputy Danny Oliver, 47, was killed after he approached a suspicious vehicle in a motel parking lot Friday morning and was shot in the forehead at close range. Oliver was a 15-year veteran who leaves behind a wife and two daughters.

Jones did not know a motive. Oliver was the first county deputy killed since 2008.

"He was not able to return fire or do anything," Jones said. He said Oliver's partner was able to shoot back as the vehicle fled the scene.

"We live as a family, today we grieve as a family," Jones said.

The suspect then shot a male driver who refused to hand over his car keys during an attempted carjacking, officials said.

Erwin said two deputies from her department were later shot in Auburn, about 30 miles north of Sacramento, as the manhunt continued. She did not immediately release the deputies' names or other identifying information.

Marquez was taken to a hospital before he could be booked into jail, Erwin said.

___

Associated Press writers Judy Lin, Juliet Williams and Alina Hartounian and AP photographer Rich Pedroncelli contributed to this story.