Two students were shot and wounded, one critically, inside a Los Angeles middle school classroom Thursday morning and police took a female student into custody, 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.

Three other people, ranging in age from 11 to 30, suffered minor cuts and scrapes.

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.

Television news footage showed a girl with dark hair wearing a sweatshirt being led out of the school in handcuffs a short time later.

Police cars blocked off an intersection near the school and parents gathered at the street corner, talking on their phones and awaiting word on their children.

Gloria Echeverria was waiting outside 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."

Steve Zipperman, chief of the Los Angeles Unified School District police force, said the school's campus remained on lockdown later in the morning but had been declared safe.

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