(CNN) Police arrested a 12-year-old girl Thursday after a morning shooting at a Los Angeles middle school left five people injured, including two with significant gunshot wounds, officials said.

The girl, who was not identified because she is a juvenile, faces charges of negligent discharge of a firearm, police spokesman Tony Im said.

A 15-year-old boy was shot in the head but doctors stabilized him, said officials at Los Angeles County+USC Medical Center. A 15-year-old girl who was shot in the wrist was also hospitalized.

Two other students, ages 11 and 12, suffered graze wounds, and a 30-year-old woman suffered a minor injury in the chaos after the shooting, officials said.

The shooting was reported to Los Angeles police at 8:55 a.m. Police didn't say what led to the shooting, and little information was released about the girl who was detained. City schools Police Chief Steven Zipperman said she was 12. She and witnesses were being interviewed, the chief said later.

The shooting happened in an elective class with students from different grades, he said.

Police found and confiscated a gun at the scene, Los Angeles police Lt. Chris Ramirez said Thursday morning. At a second news conference, Ramirez said the weapon was a semiautomatic.

The motive for the shooting is under investigation, Ramirez said.

The boy who was shot in the temple was "extremely lucky" in that the bullet missed vital structures, said Dr. Aaron Strumwasser, a trauma surgeon. Doctors said they expect the boy to recover.

"He came in and was initially awake and alert and answering questions, but his condition did start to deteriorate somewhat ... so the staff decided it was best to protect his airway, so he was intubated after arrival, and has been doing very well since that time," said Dr. Carl Chudnofsky, chief of emergency medicine.

The student remains in intensive care.

The girl who was shot in the wrist was also still hospitalized

The two other students were grazed, treated and released, Strumwasser said.

"They did not sustain anything significant," he said.

Scary scene

A woman who has two sons at the school called her 12-year-old when she heard about the shooting. She told CNN affiliate KABC that she was relieved when he picked up, but he was in tears. She said he was in the classroom right next door to the shooting. The son told her officials had them stay in the classroom and he was worried.

"He's not doing good," she told KABC.

She had been unable to reach her other son, who was in physical education class.

Students kept at school

Aerial video from CNN affiliates showed police appearing to search students outside the building.

The school day continued, and students had the chance to talk to counselors about the shooting, said Vivian Ekchian, interim superintendent of the Los Angeles Unified School District.

"The school has been declared safe, and we are communicating with parents of students at Castro Middle School, as well as neighboring campuses," she added.

There will be classes on Friday, she said at the second news conference.

Sal Castro Middle School is in the city's Westlake district, a couple of miles northwest of downtown.

Third school shooting in recent weeks

This is at least the third US school shooting in recent weeks.

On January 23, a student is accused of shooting 16 people -- killing two -- at western Kentucky's Marshall County High School in Benton.

The day before, a 15-year-old student was injured in a shooting in the Texas city of Italy. A suspect, a 16-year-old male, was "apprehended within minutes," city officials said.