Four people have been shot dead after a gunman opened fire in Rancho Tehama, northern California, at several locations, including an elementary school, police have said.
The shooting began at a home in the rural community about 120 miles from Sacramento, on November 14.
Police say the gunman was shot dead by police after four people were killed and 10 others injured in the rampage.
Officials believe the shootings started as a "domestic violence incident".
Tehama County Assistant Sheriff Phil Johnston told the AP that the gunman tried to enter the Rancho Tehama Elementary School with the intention to shoot more children, but was stopped once staff initiated a lockdown.
School officials heard shots being fired and immediately locked the school down, Phil Johnston said. He added that the decision saved children's lives.
"The shooter literally took his vehicle and rammed their fence and gate, entered the grounds on foot with a semiautomatic rifle," he told reporters.
A motive is still unclear, but police said the attacker had been involved in a domestic violence incident a day earlier.
The assailant, who has yet to be identified, appeared to be "randomly picking targets", Phil Johnston told the Los Angeles Times.
A student at the elementary school was shot and another child was hit in a truck along a road, Phil Johnston said. A woman driving the truck was also struck and all three were being treated for injuries, he said.
One of the four victims was a neighbor the gunman was accused of assaulting in January, the AP reported.
Phil Johnston said the neighbor, a woman, had a restraining order against the gunman.
A semi-automatic rifle and two handguns were recovered from one of the crime scenes, police said.
The Redding Record Searchlight spoke to a man who said he was a neighbor of the unidentified gunman.
Brian Flint said his neighbor "has been shooting a lot of bullets lately, hundreds of rounds, large magazines".
"We made it aware [to police] that this guy is crazy and he's been threatening us," Brian Flint told the publication.
California Governor Jerry Brown issued a statement saying he and his wife were "saddened to hear about today's violence in Tehama County".