Story highlights

The suspect is identified as 14-year-old James Austin Hancock

He is in custody

All of the injured are expected to survive

CNN  — 

Four students were injured and another was in custody Monday after a 14-year-old allegedly opened fire in an Ohio school cafeteria, authorities said.

Two of the victims were shot, Butler County Sheriff Richard Jones told reporters. The other two were injured “either by shrapnel from the handgun or by injuries getting away from the active shooter,” he said. All four are expected to survive.

The shooting happened at Madison Junior-Senior High School in Middletown, Ohio.

The sheriff identified the suspected gunman as James Austin Hancock, 14. He was taken into custody outside of the school, and faces charges as a juvenile of attempted murder, felonious assault, inducing panic, and making terroristic threats, Jones said.

Madison Local Schools said in an earlier Facebook post that three students had been hurt and all others were safe.

One student spoke to CNN affiliate WCPO, saying he thought he heard four gunshots while he was in the library.

“I was very scared,” Zayd Ahmed reportedly said. “Kind of like, you’re shaking, your legs won’t stop shaking. For another hour I was wondering what was going on and when are they going to tell us.”

The 11th-grader told WCPO he was surprised when he heard the suspect was 14.

“I’m just thinking, ‘Little eighth-graders? With a gun? What are they doing with a gun?’” the affiliate reported Ahmed said.

The sheriff said authorities were working to determine a motive. He declined to say whether the victims were targeted or random.

“It’s a pretty traumatic experience. Imagine being in a cafeteria when you were growing up – and you were in school, and you’re eating lunch – and then all of a sudden, there’s an active shooter,” Jones said.

“To this day, it seems as though there’s more school shootings … there’s police officers being shot,” he said. “It’s the times we live and you got prepare and train for that.”

CNN’s Mayra Cuevas contributed to this report.