A heroic teacher in Idaho who disarmed a sixth grade girl during a school shooting earlier this month recounted how she hugged the child and called police after taking away the gun.

Krista Gneiting, a math teacher at Rigby Middle School, spoke about the incident — which left three people wounded — during an interview that aired Wednesday on ABC's “Good Morning America.”

Gneiting said she was in her classroom with students preparing for their final exam when she heard a gunshot from the hallway. She looked outside her classroom and saw the school's janitor lying on the floor, before quickly shutting the door as more shots rang out.

ADVERTISEMENT

"So I just told my students, 'We are going to leave, we're going to run to the high school, you're going to run hard, you're not going to look back and now is the time to get up and go,' " Gneiting recalled.

That morning around 9 a.m., an unidentified sixth grade student had opened fire in the hallway using a handgun she had brought to school in her backpack. According to the Jefferson County Sheriff's Office, two victims were shot in the hallway before the shooter hit a third victim outside.

The custodian was shot when he threw himself between the shooter and students, according to a report from The Idaho State Journal.

The three victims didn’t suffer any life-threatening injuries, authorities said. 

Gneiting told ABC News that she went to help one of the students who had been shot when she saw the shooter holding the weapon.

"It was a little girl and my brain couldn't quite grasp that," she said. "I just knew when I saw that gun, I had to get the gun."

The teacher said she quietly asked, "Are you the shooter?"

"I just walked up to her and I put my hand over her hand, I just slowly pulled the gun out of her hand and she allowed me to," she said. "She didn't give it to me, but she didn't fight. And then after I got the gun, I just pulled her into a hug because I thought, 'This little girl has a mom somewhere that doesn't realize she's having a breakdown and she's hurting people.' "

Gneiting said she dialed 911 while still holding the girl in a hug.

"After a while, the girl started talking to me and I could tell she was very unhappy," Gneiting said. "I just kept hugging her and loving her and trying to let her know that we're going to get through this together."

As police arrived, the teacher said she explained the next steps to the child like how the officer would need to place her in handcuffs.

"She didn't respond, she just let him," she said. "He was very gentle and very kind, and he just went ahead and took her and put her in the police car."

ADVERTISEMENT

Gneiting said she hopes the community can forgive the young girl. 

"She is just barely starting in life and she just needs some help. Everybody makes mistakes," she said. "I think we need to make sure we get her help and get her back into where she loves herself so that she can function in society."

The juvenile suspect is "still in custody and has been charged,” according to a statement to ABC News from the Jefferson County Prosecuting Attorney's Office.

It is unclear what charges she is facing.