The gunman appeared to select his targets randomly: a mother driving with her children, a squat schoolhouse in rural Northern California, where students and teachers were starting their day.
Five people are dead, including the attacker, and 10 wounded after a string of shootings Tuesday morning in at least seven locations in remote Tehama County, about 125 northwest of Sacramento, Assistant Sheriff Phil Johnston said.
The gunman, who has not been publicly identified, tried to enter Rancho Tehama Elementary School, which was on lockdown, Johnston said.
"The incident could have been so much worse," Johnston said, crediting the school staff for quickly securing the building.
The gunman had a tactical vest with extra magazines for his guns, Johnston said. The incident at the school lasted about six minutes, said Johnston, who viewed surveillance video of the shooting.
Police killed the gunman after a shooting spree that appears to have begun with a dispute with a neighbor and ended in a roadside gunfight with police, Johnston said.
The wounded victims included a mother who was driving her children to school when the unidentified attacker opened fire on them "without provocation or warning," the assistant sheriff said.
The woman was being treated for life-threatening injuries. A child who was in the vehicle was not seriously wounded, according to Johnston.
Hours into an investigation that involves the FBI, the ATF and California Highway Patrol, the motive for the shootings remains unclear.
"We have no known motive," Johnston said. "We know of no real connection to any of the victims. Most of the victims in this case appear to be random selections."
A visibly shaken Johnston told reporters earlier: "This is a sad day for us here in Tehama County."
Vice president and governor send condolences
Gov. Jerry Brown and wife Anne were "saddened to hear about today's violence in Tehama County, which shockingly involved schoolchildren," the governor said in a statement. "We offer our condolences to the families who lost loved ones and unite with all Californians in grief."
On Twitter, Vice President Mike Pence wrote: "Saddened to hear of the shooting in N. California, the loss of life & injuries, including innocent children. We commend the effort of courageous law enforcement. We'll continue to monitor the situation & provide federal support, as we pray for comfort & healing for all impacted."
And US Sen. Kamala Harris tweeted: ""Heartbroken by the news of a shooting at an elementary school in Rancho Tehama. Grateful to the officers and first responders on the scene."
'A mass murderer really'
Johnston said the gunman had "prior contacts with law enforcement," but did not elaborate. He said there was a report of a domestic violence incident involving the man on Monday. He said the man had a dispute with a female neighbor who died Tuesday.
When the gunman arrived at the school, he fired multiple rounds into the building. He stole a truck and commandeered another vehicle from a motorist at gunpoint, Johnston said. There were reports that the shooter carried out random drive-by shootings on residences.
Authorities said the suspect rammed a fence and a gate at the school and probably grew frustrated that he couldn't get into the school.
It was unclear whether the gunman went there looking for someone he knew.
"We have not connected him with any one person in the school," Johnston said.
Some students were transported to hospitals by helicopter, and others were moved to a safe location in a school bus, the assistant sheriff's said. The children were later reunited with their parents.
Three children and an adult are being treated at Enloe Medical Center in Chico, officials said. Their conditions were not available.
A semi-automatic rifle and two handguns believed to be used by the gunman have been recovered, according to Johnston. There is another gun that police have yet to recover in one of the stolen vehicles.
Johnston complimented the officers who stopped the gunman.
"I have to tell you I am personally grateful to the men who engaged this suspect," Johnston said.
"It's a tragic event, but I am personally grateful for engaging such a terrible ... a mass murderer really. That's what he is."