Los Angeles (CNN) -- A 17-year-old boy arrested after a handgun in his backpack accidentally discharged and wounded two other high students Tuesday was able to bring his automatic pistol on campus apparently because the Los Angeles school does only random metal detector checks, police said.
The chief of Los Angeles Unified Schools District police, Steve Zipperman, said the district's policy calls for random screening with metal detectors, to be determined by each school's principal.
"It is a possibility that the student who walked on with that backpack was not checked," Zipperman told reporters.
The arrested student, a senior whom authorities didn't identify, entered a health class Tuesday morning and set his backpack on a desk, Los Angeles Police Deputy Chief Patrick Gannon said.
When the backpack landed on the desk, the automatic handgun discharged, firing a single round that struck a girl in the temple and a boy in the neck, Zipperman said.
The student then fled, prompting a police search, Gannon said. Police were told the boy went to another classroom, and he was taken into custody about two hours after the shooting, Zipperman said.
Zipperman said the shooting appeared accidental. "Based on the information we have, it appears that it's a possible accident," he said. "There was no struggle taking him into custody."
The 15-year-old girl was in surgery early Tuesday afternoon and was in critical condition with a head wound, and the 15-year-old boy was in stable condition with a neck wound, Gannon said.
Students and faculty dismissed from the school at 1:52 p.m. PT, authorities said. The high school had been under lockdown shortly after the 10:41 a.m. PT shooting.
Those students who witnessed the shooting were giving statements to authorities and will be given an opportunity to speak to counselors, if needed, Zipperman said.
Police corrected an earlier report that at least three people were shot at the school, Gannon said.
In 2002, two students were seriously wounded in another shooting on the campus when three other students demanded money from one of them, the Los Angeles Times reported. Both students recovered from the gunshot wounds, and the three student assailants were sentenced to jail, the newspaper reported.