(CNN) A Northern California man who killed his wife on the eve of a rampage that claimed four others and included a stop at an elementary school was ordered earlier this year to give up his firearms, officials said Wednesday.

Kevin Neal -- killed Tuesday morning by police officers near Corning -- was told he could not own weapons as part of a protective order for two female neighbors with whom he had a confrontation in late January, according to Tehama County District Attorney Gregg Cohen.

Cohen said Neal, whom he called a "deranged, paranoid killer," was being prosecuted by his office on several charges related to that incident.

Neal fired shots at the women, stabbed one and held them hostage, Cohen said. He made $160,000 bail and repeatedly harassed those alleged victims, officials said. A protective order was served in February.

Assistant Sheriff Phil Johnston told reporters he did not know whether Neal had surrendered the weapons. The shooter illegally manufactured guns he used Tuesday, officials said. Handguns police recovered were not registered to him, Johnston said.

Neal "was not law enforcement friendly" and authorities a number of times had come to his house after complaints that shots were fired from the property, Johnston said.

Charges against the gunman included assault with a deadly weapon, robbery and false imprisonment, Cohen said.

Neal's deadly rampage may have been prompted by his fatal shooting of his wife, authorities said. He shot and killed his spouse on Monday night and concealed her body under a floor in his home, Johnston said.

The discovery of the spouse's body brought the death toll to six, including the gunman. All of the dead were adults.

"We believe that's probably what started this whole event," Johnston said of the wife's shooting.

Neal's sister told CNN's Sara Sidner that he had struggled with mental health issues for at least 20 years.

"My mom spent a great deal of her time and nearly all her energy trying so hard to placate him," said Sheridan Orr, who was with her distraught mother in North Carolina.

Neal's mental state began a steep decline about a year ago, said Orr, adding the family had tried to get him help.

Before police shot him dead, Neal injured at least 10 others in a string of shootings that spanned at least seven sites in the small community of Rancho Tehama, west of Corning, police said.

Those locations include a locked elementary school that the shooter fired into from the outside, injuring a boy.

The shootings started in Neal's neighborhood shortly before 8 a.m., where he killed a woman neighbor who had a protective order against him, Johnston said. Neal had been arrested and charged in January on suspicion of assaulting her with a deadly weapon, he said.

He then stole a pickup truck and went on a 25-minute rampage in town, shooting at homes, motorists and eventually the school, apparently at random, Johnston said.

Ramming through the school's gate

"This guy was bent on ... driving by residences and arbitrarily shooting at them," Johnston said. Still, it "could have been so much worse."

Wearing a tactical vest and armed with extra magazines, the gunman attempted to enter classrooms at Rancho Tehama Elementary School.

The gunman arrived at the small school -- about 2 miles from his home -- just before classes were to begin. The staff, having heard gunfire nearby or been alerted to it, had already begun to take action.

Doors were locked and students rushed inside, where they hit the floor underneath desks and tables.

The shooter rammed the stolen pickup through the school's locked gate, walked into the schoolyard and fired his rifle through windows and walls.

He could not get inside and left six minutes later, apparently frustrated, Johnston said.

One student was in fair condition after being wounded by gunfire, the school district said. Others were hurt by flying glass.

Before reaching the school, the gunman had fired from his vehicle at passing motorists and homes, Johnston said. At one point he shot and severely injured a woman who was driving her three children to school.

The woman was being treated for life-threatening injuries. A boy who was in the vehicle was hit by gunfire or shrapnel but was not seriously wounded, according to Johnston.

"She has no clue who he was," the official said.

After leaving the school, the shooter intentionally crashed the pickup into a car. He exited the truck and gunned down at least one person there, Johnston said.

He then stole someone else's sedan and "went back on his rampage," Johnston said.

Eventually, two police officers encountered the gunman at an intersection. They returned fire, killing him, the assistant sheriff said.

Aside from the first shooting in his neighborhood, the killer appeared to be shooting people at random, Johnston said, and did not seem to have any connections to the school either.

"This is an individual who armed himself, I think with the motive of getting even with his neighbors, and when it went that far (that someone was killed) he just went on a rampage," Johnston said.

Mom raced back to school to warn people

A fearless mother may have also helped warn staff at the school about the danger.

Sara Gonzalez said she had dropped her daughter off at the school when the gunman attempted to shoot her as their vehicles passed. She said thinks the gunman's windshield stopped the bullet.

She turned her vehicle around.

"I went to my daughter's school and started honking, making people know what was going on," she said.

Gonzalez said the gunman fired at her as she tried to get out and find her daughter. She saw the man's face but he said nothing.

Jessie Sanders told CNN affiliate KCRA he tried to draw the gunman's attention away from the school.

He said he ran over to the school when he heard the crack of a semi-automatic rifle.

"When I get there, the dude was shooting through the windows," he told the Sacramento TV station. "And I said, 'Hey why don't you shoot this way instead.' "

Sanders said a bullet grazed his right forearm.

Inside the school, the children tried to stay low. Gonzalez's daughter, Arianna Ibarra, was on the floor with her fourth-grade class.

"Our teacher told us to go under our desk and keep flat in case he comes inside," Arianna said.

The teacher blocked the door with a computer, the 10-year-old said.