A female student was taken into custody after two pupils were shot and wounded, one critically, inside a Los Angeles school classroom, authorities said.

A 15-year-old boy hit in the head was taken to a trauma centre in a critical but stable condition, said fire department spokesman Erik Scott.

A girl aged 15 with a gunshot wound to the wrist was taken to a hospital in a fair condition, he said.

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

School Shooting Los Angeles
LA fire department’s Erik Scott, far right, and police officers gather outside the school (Damian Dovarganes/AP)

Police arrested the female pupil and recovered a gun after the shooting, which happened just before 9am at Salvador B. Castro Middle School, west of the city centre.

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 a junction near the school and parents gathered at the street corner, talking on their phones and awaiting word on their children.

Gloria Echeverria was 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.”

LA School Shooting
Parents wait for news of students (Damian Dovarganes/AP)

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.”