The 15-year-old victim was rushed to St. John's Regional Medical Center, where he was initially listed in critical condition. By day's end, his condition was described as improving.
The boy's alleged assailant ran from the E.O. Green Junior High School and was apprehended nearby a few minutes later by Oxnard and Port Hueneme police officers.
The shooting was not gang-related, said Keith, who added that the school had not been a particular trouble spot before.
"It looked like it was personal between the two of them," he said, declining to elaborate.
Some students said the victim, whose name was not disclosed, sometimes wore makeup and feminine jewelry and had declared himself gay. They said he was frequently taunted by other boys and had been involved in an argument with the alleged shooter, an eighth-grader who also was not named, and others Monday.
During the lunchtime argument, one of the boys shouted at Tuesday's victim, "You better watch your back," said one student who witnessed the encounter.
Police said they had not determined a motive for the crime.
Keith said investigators had also heard that the victim was gay but did not know whether that was true or whether it figured in the attack. They were sorting through several other possibilities as well, he said:
"Which are true and which are rumor, we're trying to figure out."
How a gun was sneaked into the classroom also was unclear, although the school has no metal detectors. Officers are assigned to some area high schools, but junior high and middle schools generally have no need for more than a part-time police presence, Keith said.
Six hours after the shooting, 13-year-old Mariah Thompson emerged with her mother from the locked-down school. Mariah had been interviewed by detectives, along with the two dozen other students in the school's computer lab, where the English class was meeting at the time of the attack.
"He didn't deserve it," she said, crying. She said she was one of the wounded boy's few friends, a confidant he trusted with stories about others making life at school miserable for him.
"I would always tell him, 'Don't let them get to you,' " she said.
Mariah said she had been settling in at her desk and looking at her keyboard when she heard two shots. She said she heard no words exchanged before the blasts or afterward, when the gun-wielding boy bolted.
School administrators expressed shock as word of the shooting spread.
Jerry Dannenberg, superintendent of the Hueneme School District since 2002, said he had not heard of any guns showing up in the district's schools before Tuesday.
"The ones we've found have been toys," he said.
With about 1,100 students in grades six through eight, E.O. Green has "very few problems compared to other schools," said Dannenberg, who praised the staff for immediately locking down the school and following other measures laid out in an emergency plan that is honed in practice drills once or twice a year.
In the shooting's aftermath, district officials will review the plan with police "and see whether additions should be made or whether this is just one of those terrible, unfortunate incidents that there's not much you can do about," Dannenberg said.
After the shooting, some parents waited outside the school for hours as their children were released one by one.
"I'm mad," said 14-year-old Rayven Griffith. "Schools should be a safe place, not a place where people are being rushed to the hospital."
Her mother, Tracy Griffith, also was upset.
"They say there's school tomorrow," she said, "but how can we be sure it will be safe?"
Dannenberg said extra counselors will be on hand today for students and teachers. Religious and civic groups have called to offer whatever help they can, and most parents have been understand- ing.
"There's been a heartfelt outpouring," he said. "The community has been wonderful."
Like many other cities, Oxnard has for years waged a battle against youth violence, primarily involving gangs. Its most widely publicized school incident occurred in 2001, when a teenage gunman was fatally shot by officers as he held a 17-year-old girl hostage at Hueneme High School. The noonday incident was witnessed by scores of frightened students and teachers.
Times staff writer Gregory W. Griggs contributed to this report.