Updated

The young female student who allegedly opened fire inside a Los Angeles middle school classroom Thursday reportedly thought the gun was a toy.

The shooting suspect – who police confirmed is 12 years old – is accused of opening fire inside Salvador B. Castro Middle School. She was taken into custody almost immediately after the incident.

alleged shooter

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

The Los Angeles Police Department interviewed the girl and later confirmed the shooting was an accident.

Benjamin Urbina, who was in the classroom at the time of the incident, told reporters the suspect thought the gun was a toy.

GIRL, 12, OPENS FIRE INSIDE LOS ANGELES MIDDLE SCHOOL, POLICE SAY; 4 WOUNDED

"They thought it was a toy gun, but then it shot," Urbina said. He told reporters the suspect “didn’t mean to shoot” a 15-year-old girl in the wrist.

downtown LA

Police tape off the Salvador B. Castro Middle School on Feb. 1. (AP)

A 15-year-old boy was also shot in the head. Doctors said the bullet didn’t hit anything vital or life-threatening. Three other people had minor face or head injuries, some from broken glass, but weren’t shot, officials said.

Jordan Valenzuela, 12, told The Associated Press he was in class when he heard the bang and screaming. Valenzuela said the suspect told him it was an accident.

He said the sobbing girl told him: "I didn't mean to. I had the gun in my backpack and I didn't know it was loaded and my backpack fell and the gun went off," the seventh-grader said.

Valenzuela said the girl asked him to hide the backpack with the gun inside.

"I said 'No,'" he said. "Then I moved away from her because I was a little bit scared."

SCHOOL SHOOTINGS WITH FEMALE SHOOTERS

But, he said, "she doesn't do bad things, she just stays quiet."

Shallin Lopez, a seventh-grader, was in the room at the time of the shooting. She said she never saw a gun.

"I just saw something pop," Lopez said. "It was loud. I didn't see her shoot."

people upset

People pick up students following a shooting at the Salvador B. Castro Middle School in Los Angeles. (AP)

It was not immediately clear where the girl got the semi-automatic handgun or why she brought it to the school’s campus.

The girl’s grandmother told ABC 7 her granddaughter was “loving and caring.” She also alleged the girl was bullied at school by another girl and she did not have a lot of friends.

The Associated Press contributed to this report.