FUQUAY-VARINA, N.C. (WNCN) — The Wake County Sheriff’s Office has obtained a secure custody order for a 12-year-old that attends Fuquay-Varina Middle School.

The Sheriff’s Office obtained a secure custody order for the 12-year-old and juvenile petitions were filed after Fuquay-Varina Middle School was placed on a code red lockdown after a student fired a gun at a window on Thursday morning.

Students were later dismissed early to parents and no one was injured during the incident.

Additionally, the middle school has opted to close Friday and make staff from the District Crisis Team available on campus Friday from 10 a.m. to noon to support any student or parent who needs assistance.

School officials said a teacher heard the gunshot and immediately entered the classroom and saw a student holding the gun.

“The teacher encouraged the student to give her the weapon. There were several students in the classroom at this time. No one was hurt,” a statement said that CBS 17 previously reported.

Seth Lanterman-Schneider was charged with a violation of storage of firearms to protect minors.

No other information was released.