LOS ANGELES (AP) — Four students were shot and wounded, one critically, inside a Los Angeles middle school classroom Thursday morning and police arrested a female student believed to be 12 years old, authorities said.

A 15-year-old boy hit in the head was transported to a trauma center in critical but stable condition, according to fire department spokesman Erik Scott. A 15-year-old girl with a gunshot wound to the wrist was taken to a hospital in fair condition, Scott said. Two more children were grazed by bullets.

Police arrested the female student and recovered a gun after the shooting that happened just before 9 a.m. at Salvador B. Castro Middle School, west of the city's downtown. Preliminary information indicated she was 12, said Steve Zipperman, chief of the Los Angeles Unified School District police force.

Authorities did not immediately identify a possible motive, saying the investigation was in its early stages.

The most seriously injured victim was brought to Los Angeles County-USC Medical Center and remained in intensive care during the afternoon but was doing well.

"This child was extremely lucky," said Dr. Aaron Strumwasser, a trauma surgeon. "The trajectory of the bullet did not hit any vital structures that were an immediate threat to life."

The girl wounded in the wrist also remained hospitalized but was described as resting comfortably.

Three other victims, including a woman, were initially described as having suffered abrasions. But the two children actually had grazing gunshot wounds, Strumwasser said. They were treated and released.

The woman was not brought to the hospital.

Television news footage showed a girl with dark hair wearing a sweatshirt being led out of the school in handcuffs a short time after the shooting while police cars blocked an intersection near the school and parents gathered at the street corner, talking on their phones and awaiting word about their children.

Gloria Echeverria stood near a line of police tape preventing 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."

The school's campus remained on lockdown later in the morning but had been declared safe, Zipperman said.

"We will attend to the needs of these students who witnessed this very carefully, with the understanding this is very traumatic," he said. "We have our school mental health folks that are here to support the needs of the students."

Parent Claudia Anzueto, 41, said her 12-year-old son was crying when he used someone else's cellphone to call her. She said he told her he was in a classroom next to the classroom where the shooting happened, heard a gunshot and knew the suspect.

The district has a policy that requires every middle and high school campus to conduct daily random searches by metal-detector wands at different hours of the school day for students in the sixth grade and up. Officials have not said whether students at the school were subject to any weapons screening Thursday.

Anzueto said there were no metal detectors at the school.

"Not safe, not safe, very insecure," she said. "I fear for my son's life. You know what I mean, you really hear about things like this in the news, and just to hear that something like that happened so close to home, it scared the life out of me."

Castro has about 365 students in grades 6-8 and almost all are Hispanic and many from low-income families.

At a school event last month where good attendance certificates were presented, Principal Erick Mitchell said the campus is becoming a destination for families who want a smaller school setting, the Los Angeles Times reported. Castro said an emphasis at the school on long-term goals such as college and careers has improved student behavior, he said.

"We have a new culture here," Mitchell said at the time. "I love this school. We have really good kids here. It's the best-kept secret in town."