A teacher was arrested Wednesday for carrying a concealed firearm at a middle school in Newtown, Conn., the same town where 26 children and teachers were killed in a 2012 elementary school shooting.

The teacher, Jason M. Adams of Newtown, 46, was detained by school security personnel on Wednesday morning after someone noticed him carrying a gun at Newtown Middle School, according to the Newtown Police Department.

Police then investigated and charged him with illegal possession of a weapon on school grounds. Adams has a valid state pistol permit, police said.

He was released without posting bond and is expected in court on April 20, according to police.

Adams teaches science at Newtown Middle, according to the school’s website. In a statement, the school system called the incident “very serious and troubling” and said the teacher has been placed on administrative leave pending an investigation by school officials.

“Both the Newtown Public School system and the Newtown Police Department took immediate steps to address the matter,” the school system said. “Both agencies have been working closely together to investigate the incident and are taking precautions to ensure the continued safety of our students, staff and community members.”

Adams did not immediately respond to a phone call seeking comment.

Newtown stepped up its law enforcement presence in schools after the 2012 massacre at Sandy Hook Elementary, placing armed officers in every building. Now there are armed school security officers in each building, many of whom are retired police officers, according to the Hartford Courant.

“This close working relationship between the school system and law enforcement personnel is essential in resolving incidents of this nature,” police said.