RANCHO TEHAMA RESERVE, Calif. — A gunman driving stolen vehicles and choosing his targets at random opened fire "without provocation" in a tiny, rural Northern California town Tuesday, killing four people and wounding at least 10 others, including a student at an elementary school, before police shot him dead, authorities said.

The rampage began shortly before 8 a.m. when the gunman fatally shot a neighbor he had been accused of stabbing in January, Tehama County Assistant Sheriff Phil Johnston said.

Shortly afterward, the gunman rammed through the gate of Rancho Tehama Elementary School about 2 miles away and spent about six minutes shooting into the building, striking at least one student, Johnston said.

Surveillance video showed the gunman, who was not identified, trying unsuccessfully to enter the school, authorities said.

School officials' swift decision to lock the doors after hearing gunfire was "monumental" in saving the lives of countless children, Johnston said. No one was killed there.

The gunman left the school after he could not get inside and purposely crashed the stolen truck he was driving into another vehicle and shot at its occupants, Johnston said.

The shooter stole the car of a person who stopped to check on the crash and ran away when confronted with a gun. He continued the rampage until police shot him about 45 minutes after it started, Johnston said.

"This man was very, very bent on completing what he set out to do," the assistant sheriff said.

The shootings occurred in the rural community of Rancho Tehama Reserve, a homeowners association of modest houses and trailers in rolling oak woodlands dotted with grazing cattle about 130 miles north of Sacramento.

Police offered no immediate word on the assailant's motive, but a sheriff's official said the shooter's neighbors had reported a domestic violence incident a day earlier. Officials did not specify who was involved or what happened.

Brian Flint told the Record Searchlight newspaper in the city of Redding that his neighbor, whom he knows only as Kevin, was the gunman and that his roommate was among the victims. He said the shooter stole his truck.

"The crazy thing is that the neighbor has been shooting a lot of bullets lately, hundreds of rounds, large magazines," Flint said. "We made it aware that this guy is crazy and he's been threatening us."

Johnston said officials received multiple 911 calls about gunfire at an intersection of two dirt roads in the upper reaches of the sparsely populated neighborhood. Minutes later, more calls reporting shots flooded in from different locations, including a small elementary school.

"It was very clear at the onset that we had an individual that was randomly picking targets," Johnston said.

Witnesses reported hearing gunshots and children screaming at the school, which has one class of students from kindergarten through fifth grade.

Johnston said the student shot at the school was flown by helicopter to a hospital, and another student was wounded in a car on the way to school.

He said authorities believe they know the identity of the shooter but declined to release his name pending further investigation. He appears to have fired a semiautomatic rifle and two handguns at seven locations, authorities said.

Salvador Tello said the gunman fired at a truck in front of him as he went to drop off his three children at school. Tello said he was about three blocks from the school when bullets made "big holes" in the truck.

He said he forced his children to duck down, slammed his vehicle into reverse and headed to the children's grandmother's house.

"I put my kids down and put my truck in reverse and went out," he said. "I don't believe it, because I wake up, take my kids, feed them cereal and put them in the truck and say, 'Let's go to school like a normal day.'"

On the way, he said he saw an apparent gunshot victim and police at another scene.

The rural subdivision is described on its website as a "quiet private country community" where "the people are friendly and the pace is relaxed." The homeowner association's website says there are 2,016 lots in the community and 1,346 voting members.