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.

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.

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.