NEWTOWN, Conn. - A middle school teacher in Newtown, Connecticut, accused of carrying a loaded .45-caliber pistol in a holster inside the school has resigned.

Newtown School Superintendent Joseph Erardi confirmed Saturday that Jason Adams resigned at the end of the school year.

The teacher at Newtown Middle School was arrested on April 6 after police say he was seen with the pistol and detained by school security.

Get Breaking News Delivered to Your Inbox

Police say he had a valid pistol permit, but Connecticut state law prohibits possession of firearms on school grounds.

Adams was placed on administrative leave.

At the time, Newtown schools said in the statement: "This matter is very serious and troubling, both the Newtown Public School system and the Newtown Police Department took immediate steps to address the matter."

He didn't immediately return a message Saturday seeking comment.

Newtown Middle School is less than 2 miles from the site of the December 2012 shooting rampage at Sandy Hook Elementary School that killed 20 first-graders and six educators.