At least seven people were killed in a mass shooting in the northern California city of Half Moon Bay on Monday, days after a gunman targetted a dance hall.
The suspect in the latest attack was arrested after driving to a police station, allegedly to turn himself in, officials said.
A 67-year-old man Zhao Chunli was intensified as the attacker.
The deadly violence, happening at two different locations, follows another mass shooting in the southern California city of Monterey Park on Saturday. 11 people were killed in the majority-Asian area during Lunar New Year celebrations.
California Governor Gavin Newsom said he was visiting Monterey Park victims in hospital when he was informed of the shooting in Half Moon Bay, about 50 km south of San Francisco.
"Tragedy upon tragedy," he wrote on Twitter.
Zhao is believed to have worked at one of the places where the shooting happened.
Officials said the sites were staffed by farm workers, while local media described at least one of them as a mushroom farm.
"There were children on the scene at the incidents," San Mateo County Supervisor Ray Mueller told reporters. "This is a truly heartbreaking tragedy in our community."
A motive is yet to be established, but the suspect is said to be cooperating with investigators.
One semi-automatic handgun was found in his car, according to the police.
Responding officers found four people dead and a fifth victim with life-threatening wounds at the first location in Half Moon Bay, San Mateo County Sheriff Christina Corpus said at a press conference.
Three more dead were discovered at another place nearby, she added.
The suspect was caught on cameras turning himself in, with two men in plainclothes and one uniformed deputy filmed ordering him out of a car at gunpoint.
He came out, was thrown to the ground and searched for weapons. Multiple uniformed officers soon swooped in with long guns.
A woman who witnessed the arrest told reporters she had gone to the sheriff's department to get more information as she was involved in farming and concerned about the well-being of the workers.
"I came down here to find out what I could about the situation and why this happened and I hadn't expected to get quite that close to it," Kati McHugh told reporters on the scene. "It was a little too close for my comfort."
There were 38 mass shootings in the United States in the first 21 days of 2023, according to the Gun Violence Archive.