A 6-year-old who police say opened fired in a Virginia classroom and seriously injured a teacher was in custody Friday, police said.

“This was not an accidental shooting,” Newport News police Chief Steve Drew said.

No students were injured in the afternoon shooting at Richneck Elementary School in Newport News, police said in a statement.

The shooting happened in a first-grade classroom, and the child and teacher, who knew each other, were apparently alone, Drew said at an evening news conference.

“The altercation was between a 6-year-old, the student, who did have the firearm, and the teacher, and then a round was fired,” the chief said.

The teacher, a woman in her 30s, was hospitalized, officials said.

Police at the scene of a shooting at a school in Newport New, Va., on Jan. 6, 2023. (WAVY)

“Her injuries are still considered life-threatening, but there was some improvement in the last update that we got,” the chief said Friday evening.

The chief said the 6-year-old boy will not be identified because of his age.

“I’m in awe, and I’m in shock, and I’m disheartened,” Newport News Public Schools Superintendent George Parker III said at the evening news conference.

James J. Fedderman, president of the Virginia Education Association, the union that represents many public school teachers in the state, said in a statement the shooting is “yet another example of senseless violence affecting our public schools.”

Becky Pringle, president of the National Education Association, said in the same statement she hopes the teacher recovers completely. “This will not stop until elected leaders take consequential action and stand up to the gun lobby to prevent gun violence in our communities and school,” she said.

Police and school officials are looking into what happened before the shooting.

Officers were at the school “within minutes” of getting a call about shots fired, the police chief said.

The school was locked down, and Drew praised the poise and efficiency of the students and faculty who scrambled to safety.

“I could not be more impressed,” he said.

All of the students have since been moved to the gymnasium and are being reunited with their parents.

“The main thing right now is we got all these kids safe and the number one priority for me is to check on our victim at the hospital and get all these students back with their families,” Drew told reporters earlier in the day.

Newport News Mayor Phillip Jones vowed to conduct an “after action” investigation and report so such an incident “doesn’t happen again.”

Schools chief Parker said he’ll look at upgrading the district’s metal detectors, which can be activated for certain days, but which were not in effect full time at the elementary school.

It wasn’t clear where the child might have obtained the weapon, which Drew described only as a handgun.