Updated

A young female student allegedly opened fire inside a classroom at a Los Angeles middle school Thursday, leaving four students wounded — including one in critical condition, police said.

The shooting suspect — who police confirmed is 12 years old — allegedly opened fire just before 9 a.m. inside Salvador B. Castro Middle School and was taken into custody. The student was not immediately identified.

The shooting was said to be an accident, according to the Los Angeles Police Department.

A female student, 15, was shot in the wrist and taken to the hospital in fair condition. And another student, a 15-year-old boy, was "extremely lucky," according to trauma surgeon Dr. Aaron Strumwasser, as "the trajectory of the bullet did not hit any vital structures that were an immediate threat to life."

Officials expect both teens to make a full recovery.

A 30-year-old woman injured was not hospitalized and the nature of her injury was not immediately known.

Police initially said three others who were wounded were not injured by the shooting. But two other children — a boy, 11, and a girl, 12 — were grazed by bullets, and were treated and released.

Gunfire erupted during a first period elective class that included mixed grades in the middle school, which is on the same California campus as Belmont High School, officials said at a press conference Thursday afternoon.

"We do not know yet how a young person ended up having the ability to have access to a firearm and bring it on campus," said Steve Zipperman, chief of the Los Angeles Unified School District police force.

A weapon was recovered at the scene.

los angele shooting

A female student was taken into custody after shots were fired inside a Los Angeles middle school classroom. (KTTV)

Television news footage showed a girl with dark hair and wearing a sweatshirt being led out of the school in handcuffs shortly after the shooting occurred.

Gloria Echeverria was waiting outside a police tape line that prevented people from approaching the school, waiting for news about her 13-year-old son.

"I'm just hoping it has nothing to do with him," she said. "I'm just scared for all the kids — school is supposed to be a safe place for them, and apparently it's not."

shooting4

Two 15-year-old students, a male and female, were wounded in the shooting, the LAFD reported. (KTTV)

Police said the situation was under control and there were no outstanding suspects in the incident. School officials said "a normal school day will continue" despite the lockdown.

"We will attend to the needs of these students who witnessed this very carefully, with the understanding this is very traumatic," Zipperman said.

More than 360 students are enrolled in the Salvador B. Castro Middle School. Los Angeles police said random weapon checks are conducted on the campus, located in the Westlake neighborhood of Los Angeles.

Fox News' Shira Bush and The Associated Press contributed to this report.