Correction: A previous version of this story said that the suspect in custody was a male student, citing authorities’ comments to local news. Officials said later Thursday that the suspect was a girl. The story has been corrected.

A sixth-grade girl shot two students and a custodian at an Idaho middle school before she was disarmed by a teacher Thursday morning, local officials said, in what the superintendent called a school district’s “worst nightmare.”

The three were treated for injuries that were not believed to be life-threatening. Authorities shared little about what led up to the shooting at Rigby Middle School near Idaho Falls, saying that they were still determining a motive for the attack.

The girl, a student at the school, first shot two people in a hallway with a handgun before going outside and shooting another, Jefferson County Sheriff Steve Anderson said during a news conference. She was then disarmed by a female teacher, who held her until police arrived, Anderson said.

Anderson did not release a name. He said the girl was being held at the sheriff’s office.

Charges will not be filed until the investigation is complete, prosecutor Mark Taylor said, but the shooter could face three counts of attempted murder.

Trauma surgeon Michael Lemon said at the news conference that it was fortunate that the gunshot wounds were not worse. The adult victim was treated and released and the two children are staying at the hospital overnight.

“We feel absolutely blessed,” Lemon said.

Classes will not be in session Friday so families can be together, Jefferson School District Superintendent Chad Martin said. School counselors would be available at the middle school to offer help.

“This is the worst nightmare a school district can face,” Martin said. “We prepare for it but we’re never truly ready for it.”

Authorities from multiple agencies responded just after 9:15 a.m. to reports of a shooting, Kerry Hammon, a spokeswoman for the Idaho Falls Fire Department, told The Washington Post. The fire department dispatched three ambulances to take the victims to Eastern Idaho Regional Medical Center and they were in stable condition, Hammon said.

Students were moved to the nearby high school, where their parents could pick them up, according to local media reports.

The school, in Rigby, Idaho, is 15 miles north of Idaho Falls.

Idaho Gov. Brad Little (R) said via Twitter that he was monitoring the situation.

The Idaho Education Association said in a statement that patience “will need to be at a premium while school officials and law enforcement agencies investigate the situation.”

“We send positive thoughts to the victims of the tragic incident that occurred this morning at Rigby Middle School and hope for their full and rapid recovery,” the organization said.