Updated

LOS ANGELES -- A loaded gun inside a high school student's backpack went off when he dropped it in class, firing off a bullet that injured two nearby teens, police say.

The 17-year-old student was negligent in bringing the 9 mm semiautomatic pistol to Gardena High School, but it's "plausible" that the shooting was an accident, said Police Capt. Bill Hayes.

"He literally dropped his knapsack on the desk, and it went off," said John Deasy, incoming superintendent of the Los Angeles Unified School District.

Detectives are trying to figure out where the boy got the pistol, which was recovered. Authorities said the teen took his backpack and ran to another classroom after the gun went off, but the bag has not been found.

Two 15-year-olds were hit with the same bullet, deputy Police Chief Patrick Gannon said.

A girl was in critical condition after it grazed her skull, said Dr. James Ausman, a neurosurgeon at Los Angeles County Harbor-UCLA Medical Center. A boy was in fair condition after being shot in the neck.

The 10th-grader was in custody at a juvenile detention center after police interviewed him and his mother, Hayes said. The boy expressed remorse, and his mother was concerned about the two victims.

The teenager was on probation for a fight at school last year, Hayes said. He could be charged with assault with a deadly weapon, he said.

The shooting occurred in a classroom at the school, where Principal Rudy Mendoza said students were on a break at the time. The campus, about 15 miles south of downtown, was locked down after the incident.

Shedric Porter, 14, said he was walking past the classroom at the time.

"I didn't see anything, but I heard the shot, and it was really loud," he said. "I stopped. I was scared. Then I thought it was just a book or something hitting the ground, but it was too loud for that."

It was not immediately unclear how the student got in with the gun in his backpack, school district spokeswoman Gayle Pollard-Terry said.

Students are checked with security wands on a random basis at Gardena High, she said. No district school is equipped with walkthrough metal detectors.

The 2,400-student school is no stranger to gun violence. Two students were shot at the school in February 2002, when three assailants tried to hold up them in an outdoor area.

In the past five years, two students have been expelled for firearms violations.

The school ranks among the district's lowest-performing high schools, with roughly 35 percent of its students dropping out.

Five years ago, more than 2,000 students were suspended, and 15 students were expelled. Those figures remained high until last year when the number of suspensions dropped to 300 and expulsions to two.

But parents still found the incident Tuesday to be surprising. They rushed to the school after hearing about the shooting, pacing nervously as they waited behind police tape for word from their children.

"I've never heard of anything like this before," said Thomas Hill, whose 16-year-old and 18-year-old children attend the school.

Click to read more on the Los Angeles high school shooting at MyFoxLA.com